| rename_cat_variables | R Documentation | 
Renaming categorical variables and their levels, for instance for summary tables, can be fiddly. This function accepts tibbles containing the old and new names for arguments and levels, and returns a dataframe (or list of dataframes, if one is passed) with variables and levels renamed.
rename_cat_variables(dat, ..., var_names = NULL, level_names = NULL)
| dat | A dataframe or list of dataframes (e.g., from multiple imputation) contains the variables. If a list is passed, it must have class "list" | 
| ... | The variables to be renamed | 
| var_names | A tibble containing 'old' and 'new' names for the variables. If NULL, only levels are renamed. | 
| level_names | A tibble containing old 'var' names and 'level_old' and 'level_new' names. If NULL, only variables are renamed. | 
The dataframe or list of dataframes passed to dat, with variables and/or levels renamed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.