View source: R/rec_variables.R
rec_cat_5a3 | R Documentation |
Por defecto recodifica variables _likert_ de 5 niveles a 3 niveles.
rec_cat_5a3(variable, rec = "1:2 = 1; 3 = 2; 4:5 = 3; else = 9", labels = NULL)
variable |
numeric, Valores de variable a recodificar. |
rec |
string, por defecto recodifica 1:2 en 1, 3 en 2 y 4:5 en 3. Todo lo demás lo deja como 9 |
labels |
vector string, etiquetas para las variables recodificadas. Por defecto NULL. |
haven_labelled
vect <- c(1, 4, 6, 99, NA)
rec_cat_5a3(vect, labels = c('alto' = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.