month_factor: Month as factor/numeric

View source: R/utils_date_time.R

month_factorR Documentation

Month as factor/numeric

Description

Month as factor/numeric

Usage

month_factor(x, label = FALSE, abbr = TRUE)

Arguments

x

chr/Date/POSIXt Names of months as case insensitive character vector, if using abbreviations, they must be of consistent length. Otherwise, a Date or POSIXt.

Value

factor If x is provided, the month as a factor. If x is not provided, an ordered factor of the months

See Also

Other time: duration_print(), excel_date(), season_factor(), time_aggregates, time_difftimes, time_elapsed(), time_factor(), timespan(), week_factor()

Examples

month_factor()
month_factor(c('Se', 'No'))
month_factor(c('Se', 'No'), label = TRUE)
month_factor(seq(lubridate::floor_date(Sys.time(), "year"), Sys.time(), by = "day"), label = TRUE, abbr = FALSE)

yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.