Hello,
I have a time series with one variable naturally being date/time.
I split the date/time into 2 variables one being date and the other time using
temp_HR=temp_HR%>%mutate(date=as.Date(recorded_dttm))
temp_HR=temp_HR%>%mutate (time=format(as.POSIXct(recorded_dttm) ,format = "%H:%M:%S"))
now, I want to create a new variable with the time difference between consecutive elements. However the time variable generated above is in character format.
any advice?
thank youo.