Learn R Programming

pixr (version 0.1.0)

year_month_to_date: Convert Year-Month String to Date

Description

Converts a year-month string in "YYYYMM" format to a Date object (first day of the month).

Usage

year_month_to_date(year_month)

Value

A Date vector.

Arguments

year_month

Character vector of year-month strings in "YYYYMM" format.

Examples

Run this code
year_month_to_date("202312")
year_month_to_date(c("202301", "202302", "202303"))

Run the code above in your browser using DataLab