Re: [R] Pb with date time sequence with period<1sec

2015-09-10 Thread peter dalgaard
Plus, current dates are an awful lot of seconds since 1970-01-01, so the relative error on second-scale differences is bigger than you might think: > as.numeric(Sys.time()) [1] 1441874878 and since relative representation errors are of the order 1e-16, the corresponding absolute errors are abou

Re: [R] Pb with date time sequence with period<1sec

2015-09-09 Thread Sarah Goslee
Looks like R FAQ 7.31 to me. https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f On Wed, Sep 9, 2015 at 4:19 AM, DE wrote: > Hi, > > I'd like to create a date-time seq with a period of 0.05 s, over several > days. > > # try : > start<-strptime(nom_f

[R] Pb with date time sequence with period<1sec

2015-09-09 Thread DE
Hi, I'd like to create a date-time seq with a period of 0.05 s, over several days. # try : start<-strptime(nom_fich,format="%y%m%d") time<-seq(from=start, by=0.05, length.out = 86400*20*3) print(as.POSIXlt(time[2])$sec) # result is 0.0495 and not 0.05 as expected But If I am looking at the