int_diff {lubridate} | R Documentation |
int_diff returns the intervals that occur between the elements of a vector of
date-times. int_diff is similar to the POSIXt and Date methods of
diff
, but returns an interval object instead of a difftime object.
int_diff(times)
times |
A vector of POSIXct, POSIXlt or Date class date-times |
An interval object that contains the n-1 intervals between the n date-time in times
dates <- now() + days(1:10) int_diff(dates)