Try this:
> Lines <- "19:21:59.855
+ 19:21:59.905
+ 19:21:59.955
+ 19:22:0.5
+ 19:22:0.55
+ 19:22:0.105
+ 19:22:0.155
+ 19:22:0.205
+ 19:22:0.255
+ 19:22:0.305
+ 19:22:0.355
+ 19:22:0.405"
>
> DF <- read.table(textConnection(Lines))
> library(chron)
> tt <- times(DF[[1]])
> diff(tt)
[1
Hello,
I have been attempting to write a script that automatically calculates time
intervals from a list of hh.mm.ss.ms timestamps. Should be easy, but I keep
running into problems. Any help would be greatly appreciated!!
Problems:
1. If I parse the timestamp, it doesn't always return the digits
2 matches
Mail list logo