edu_factorise | R Documentation |
Will convert even a mixed character vector (combining numbers and text) of education levels 10 and 4 to a factor.
edu_factorise(x, levels)
edu4_factorise(x)
edu9_factorise(x)
x |
character vector |
levels |
levels returned from the edu_levels() function |
Specialized returns
edu_factorise - with option to choose number of levels
edu4_factorise - directly transform vector coded in 4-level scheme
edu9_factorise - directly transform vector coded in 9-levels scheme
factor
Other edu_functions:
edu_compile()
,
edu_compute()
,
edu_levels2name()
,
edu_levels()
,
edu_reduce()
,
edu_to_years()
edu9 <- c("7", "7", "8", NA, "Primary school (6 years)", "5", "9")
edu_factorise(edu9, 9)
edu9_factorise(edu9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.