Description Usage Arguments Value Functions Examples
Categorize continuous age into classical levels
1 2 3 | cdc_edades_peru(data, variable_edad)
cdc_edades_clean(data, variable_edad, tipo_edad)
|
data |
input dataset |
variable_edad |
edad como variable continua |
tipo_edad |
tipo de edad: A, M, D o año, mes, día |
tidy categorical variables from one continuous age variable
cdc_edades_peru
:
cdc_edades_clean
: clean age variables in different time units (year, months, days)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(tidyverse)
library(charlatan)
library(skimr)
library(rlang)
data_edad <- tibble(age=charlatan::ch_integer(n = 100,min = 2,max = 100))
data_edad %>% skimr::skim_without_charts()
data_edad %>%
cdc_edades_peru(variable_edad = age) %>% glimpse()
data_edad %>%
cdc_edades_peru(variable_edad = age) %>%
select(age,edad_quinquenal) %>%
group_by(edad_quinquenal) %>%
skimr::skim() %>%
select(edad_quinquenal,numeric.p0:numeric.p100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.