How to check if a string contains numbers in R
|
> grepl(“[[:digit:]]”, yourstring) |
2
Kudos
2
Kudos
|
> grepl(“[[:digit:]]”, yourstring) |
If you are finding the length of time (in hours) between two columns of dates in a dataframe: > df$yourLength <- round(int_length(interval( df$yourStartTime, df$yourEndTIme)) / 60 / 60, digits = 2) [1] [interval lengths] … or … If... Continue →