View source: R/date_to_cmonth.R
date_to_cmonth | R Documentation |
Convert a date to a calendar month, either as a numeric value, or as an ordered factor.
date_to_cmonth(x, as_factor = FALSE)
x |
A date |
as_factor |
TRUE or FALSE, defaults to FALSE |
Either a numeric value giving the month of the year (1 = January) or a factor with the name of the month of the year.
x <- as.Date("01/01/2019", format = "%d/%m/%Y")
date_to_cmonth(x)
date_to_cmonth(x, as_factor = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.