Displaying 1 result from an estimated 1 matches for "time_el".
Did you mean:
time_
2011 Jul 28
1
Calculating difference in variable values (e.g. elapsed time) in data frame
...ta:
time <-
c("19:36:11","19:36:12","19:36:13","19:36:14","19:36:15","19:36:16")
strptime(time, "%H:%M:%S")
y<-c(197,194,189,179,166,150)
mydata<-data.frame(time=time,y=y)
OK, now how do I create a new variable, say, time_el, that would
calculate the elapsed time since 19:36:11? I assume that I need the
strptime() function to make sure R treats the character strings as time.
Thank you very much for any & all assistance!
-Philippe