cut_date | R Documentation |
The periods are defined by a day and month. The same day from different years with be in the same period.
cut_date(x, dm, include_last = TRUE)
x |
the dates in POSIXt or Date format. |
dm |
the breakpoints of the periods in 'day-month' format. |
include_last |
Should the last period include the last day?
Defaults to |
x <- as.POSIXct( c( "2015-01-01", "2014-01-02", "2013-01-03", "2012-01-31", "2011-02-01", "2012-12-31" ) ) cut_date(x, dm = c("1-1", "1-2", "1-3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.