[R] DateDiff

Santosh Srinivas santosh.srinivas at gmail.com
Thu Oct 7 05:07:48 CEST 2010


Dear List, 

I have a column of dates say:
test$date1 <- seq(19900511, to = 19900521)

I want the next column to have the number of days between each subsequent
date i.e days between r(i+1) and r(i)

Any easy way to do this? (I've done it in a roundabout way but just
wondering if there is any way more than done a loop)

Thanks.



More information about the R-help mailing list