View source: R/time_arithmetic.R
time_add | R Documentation |
A very fast method of adding time units to dates and date-times.
time_add(
x,
timespan,
roll_month = getOption("timeplyr.roll_month", "xlast"),
roll_dst = getOption("timeplyr.roll_dst", c("NA", "xfirst"))
)
time_subtract(
x,
timespan,
roll_month = getOption("timeplyr.roll_month", "xlast"),
roll_dst = getOption("timeplyr.roll_dst", c("NA", "xfirst"))
)
time_floor(x, timespan, week_start = getOption("lubridate.week.start", 1))
time_ceiling(
x,
timespan,
week_start = getOption("lubridate.week.start", 1),
change_on_boundary = is_date(x)
)
x |
Time vector. |
timespan |
timespan. |
roll_month |
See |
roll_dst |
See |
week_start |
day on which week starts following ISO conventions - 1
means Monday, 7 means Sunday (default). When |
change_on_boundary |
|
The methods are continuously being improved over time. Date arithmetic should be very fast regardless of the timespan supplied. Date-time arithmetic, specifically when supplied days, weeks, months and years, is being improved.
A date, date-time, or other time-based vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.