How to check if a string contains numbers in R

> grepl(“[[:digit:]]”, yourstring)
[1] TRUE/FALSE

 
2
Kudos
 
2
Kudos

Now read this

How to identify the length of time between two dates in R

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 →