View source: R/factor_by_label.R
factor_by_label | R Documentation |
Turns a dic variable into a factor based on the value labels
factor_by_label(x)
x |
A vector with dic information. |
A factor
dat_dic <- apply_dic(ex_scaledic_data, ex_scaledic_dic)
# Proportions of responses
dat_dic$rel_2 |> factor_by_label() |> table() |> prop.table()
# A cross table
table(factor_by_label(dat_dic$rel_1), dat_dic$gender)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.