Description Usage Arguments Details Value See Also Examples
Try to parse period labels and convert them to the format used by the dem packages.
1 2 3 | clean_period(x, language = "English")
clean_period_df(x, language = "English")
|
x |
A numeric or character vector. |
language |
The language in which text labels are written. Defaults to English. |
Open intervals such as "<2020"
or "2020+"
are not allowed.
By default, clean_period
assumes that any
text labels are written in English. However,
other languages can be specified using
the language
argument. Current choices are
ADD OVER TIME.
Function clean_period_df
returns a data frame
showing how each unique element in x
is
interpreted by function clean_period
and whether
the element can be interpreted as a valid
period label.
clean_period
returns a character vector with the same
length as x
in which labels that have been
parsed are translated to dem formats.
clean_period_df
returns a data frame with columns
"input"
, "output"
, and "is_valid"
.
is_valid_period
, clean_age
,
clean_cohort
1 2 3 4 5 6 7 8 9 10 11 | x <- c("before 2000",
"after 2000",
"2020 Jan",
"Q3 2020",
"January 2020",
"2025 first quarter",
"untranslatable",
"2020-2025")
x
clean_period(x)
clean_period_df(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.