| round_dates | R Documentation |
Given a vector of date(s), return the first or last day of the month in which the date occurs
date_floor(dates)
date_ceiling(dates)
dates |
A vector of date(s) |
For each element in dates, date_floor() returns a date
corresponding to the first day of the month in which the dates element
falls. date_ceiling() returns the final day of the month.
A vector of date(s) the same length as the input dates.
date_floor(Sys.Date())
date_floor(c(Sys.Date(), as.Date("2017-10-18")))
date_ceiling(c(Sys.Date(), as.Date("2017-10-18")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.