Description Usage Arguments Details Value Examples
Identify the elements of a vector that are
valid labels for cohorts. Each element is assessed
independently, so x
can contain
a mix of different single-year, multiple-year,
quarter, and month formats, and labels
can overlap.
1 |
x |
A vector. |
NA
s are treated as valid labels.
A logical vector, the same length as x
.
1 2 3 4 | ## years
x <- c("2030-2035", "2021", "<2000", "Gen Z", NA,
"2020 Q4", "2021 Sep", "<2022 Jul")
is_valid_cohort(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.