Description Usage Arguments Author(s)
Reads labels from a reference dataset (usually imported from Stata, SPSS, or SAS) and applies them to the same variable in a label-free dataset to create a factor variable with levels and labels. By default, the levels will be sorted by their frequency in the dataset.
1 |
df |
main data frame containing the dataset to modify |
new_var |
string for the name of the new factor-ized variable you create. |
ref_df |
reference labelled data frame whose labels you want to use |
var |
string containing the variable name you want to change to a factor |
Laura Hughes, laura.d.hughes@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.