as_date_range_month: Convert non-ambiguous labels fopr one-month periods or...

Description Usage Arguments Details Value See Also Examples

View source: R/as_date_range.R

Description

Convert standard labels for one-month periods or cohorts, such as such as "<2020 Jan", "2020 Jan", "2020 Feb" to labels that give precise date ranges such as "(-Inf, 2020-03-31]", "[2020-04-01, 2020-06-30]", "[2020-07-01, 2020-10-31]".

Usage

1

Arguments

x

A vector of period or cohort labels.

Details

The vector of period or cohort labels x is typically created using functions format_period_quarter or format_cohort_quarter.

Value

A factor the same length as x.

See Also

as_date_range_year, as_date_range_multi, as_date_range_custom, as_date_range_quarter

Examples

1
2
x <- c("<2010 Dec", "2010 Dec", "2011 Jan")
as_date_range_month(x)

johnrbryant/demprep documentation built on Dec. 31, 2021, 11:58 a.m.