Description Usage Arguments Examples
Convert a character to a numeric expression.
1 2 | chr_numeric(column, validate_min = NA, validate_max = NA, digits = NA,
decimals = "point", na_id = "NA", is_integer = FALSE)
|
column |
A column from a survey data frame where gender is recorded. |
validate_min |
The valid minimum value. Defaults to |
validate_max |
The valid maximum value. Defaults to |
digits |
How many digits are valid in the raw date. Defaults to |
decimals |
Defaults to |
na_id |
Is there a special character ID for missing variables? (Default: |
is_integer |
Numeric or integer should be returned? Defaults to |
1 2 3 4 5 6 7 8 9 10 11 12 | chr_numeric(column = as.character (c(1982, 1990.5, 2019,
"missing", NA, 1678)),
validate_min = 1900, validate_max = 2017,
digits = NA, decimals = "point",
na_id = "missing",
is_integer = FALSE )
chr_numeric(column = as.character (c("1 - egyet", "11 - tizenegyet",
"missing", "2")),
validate_min = NA, validate_max = NA,
digits = 2,
na_id = "missing",
is_integer = FALSE )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.