Learn R Programming

lares (version 5.0.3)

year_month: Convert Date into Year-Month (YYYY-MM)

Description

This function lets the user convert a date into YYYY-MM format

Usage

year_month(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(), formatNum(), holidays(), impute(), left(), normalize(), numericalonly(), ohe_commas(), ohse(), removenacols(), removenarows(), replaceall(), textFeats(), textTokenizer(), vector2text(), year_week()

Examples

Run this code
# NOT RUN {
year_month(Sys.Date())
# }

Run the code above in your browser using DataLab