year_month: Convert Date into Year-Month, Year-Quarter or Year-Week...

View source: R/wrangling.R

year_monthR Documentation

Convert Date into Year-Month, Year-Quarter or Year-Week Format

Description

This function lets the user convert a date into YYYY-MM, YYYY-QX, or YYYY-WW format easily.

Usage

year_month(date)

year_quarter(date)

year_week(date)

Arguments

date

Date vector. Date to transform format.

Value

Vector with dates reformatted

See Also

Other Data Wrangling: balance_data(), categ_reducer(), cleanText(), date_cuts(), date_feats(), file_name(), formatHTML(), holidays(), impute(), left(), normalize(), num_abbr(), ohe_commas(), ohse(), quants(), removenacols(), replaceall(), replacefactor(), textFeats(), textTokenizer(), vector2text(), zerovar()

Examples

year_month(Sys.Date())
year_quarter(Sys.Date())
year_week(Sys.Date())

lares documentation built on Sept. 13, 2024, 1:08 a.m.