edu_compute | R Documentation |
Using existing data in the MOAS, fills in gaps, converts from on type of coding to another etc.
edu_compute(
data,
edu4 = edu_coded4,
edu9 = edu_coded10,
edu_years = edu_years,
prefix = "edu_",
keep_all = TRUE
)
data |
MOAS-like data |
edu4 |
unquoted column containing Education coded in 4 categories |
edu9 |
unquoted column containing Education coded in 4 categories |
edu_years |
unquoted column containing Education in years to highest completed |
prefix |
string to prefix column names of computed values |
keep_all |
logical, append to data.frame |
a data.frame
Other edu_functions:
edu_compile()
,
edu_factorise()
,
edu_levels2name()
,
edu_levels()
,
edu_reduce()
,
edu_to_years()
edu <- data.frame(
edu4 = c("3", "High school", 1, NA,
"University/University college (> 4 years)", NA,
"University/University college (< 4 years)"),
edu9 = c(7,7,8,NA,"Primary school (6 years)",5, 9),
edu_years = c(NA, 12, 9, NA, 19, 19, NA),
mother = c("3", "High school", 1, NA,
"University/University college (> 4 years)",
"University/University college (> 4 years)",
"University/University college (< 4 years)"),
father = c(7,7,8,4,"Primary school (6 years)",5, 10),
stringsAsFactors = FALSE
)
edu_compute(edu,
edu4 = edu4,
edu9 = edu9,
edu_years = edu_years)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.