Description Usage Arguments Details Note See Also Examples
Function to round dates to various units
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | dayify(x)
weekify(x)
week52ify(x)
isoweek52ify(x)
semimonthify(x)
halfmonthify(x)
monthify(x)
quarterify(x)
yearify(x)
floor_year(...)
floor_quarter(...)
floor_semimonth(x)
floor_halfmonth(x)
floor_month(...)
floor_week52(...)
floor_isoweek52(...)
floor_week(...)
floor_day(...)
floor_hour(...)
floor_minute(...)
floor_second(...)
ceiling_year(...)
ceiling_quarter(...)
ceiling_month(...)
ceiling_week(...)
ceiling_day(...)
ceiling_hour(...)
ceiling_minute(...)
ceiling_second(...)
|
x |
vector of date time objects |
... |
arguments passed to other functions |
The 'date'-ify functions round each date down to the beginning of that
period using the floor_date
function. This
allows the continued use of date functions.
floor_X
functions round to the minimum and amximum of the interval
respectively. They are convenience
functions for floor_date(x, unit='X')
.
Xify
functions are synonyms for floor_X
.
Functions denoted week52
normalize the number of weeks in year to 52
by pushing any days in week 53 into the 52nd week. Note, isoweek functions do
not align nicely to year boundaries.
TODO:
parse from character
1 2 3 4 5 6 7 8 9 | x <- seq( ymd(20011231), ymd(20301231), "year" )
lubridate::week(x)
week52ify(x)
week( week52ify(x) )
x <- seq( ymd(20011231), ymd(20301231), "year" )
lubridate::isoweek(x)
isoweek52ify(x)
isoweek( isoweek52ify(x) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.