Description Usage Arguments Details Examples
Map values of variables.
1 | map_values(vars, mapping, rename)
|
vars |
Function or formula that returns selected columns from a data.frame. Alternatively, character vector of column names. |
mapping |
The mapping to apply. This should be a named vector, where the names are the old values, and the elements are the new values. There should be at most one unnamed element, representing 'all other' elements. |
func |
Function to do the imputation (e.g. mean, median). Can be a user defined function or a formula, where a dot represents the column. |
Currently, this function always turns the mapped variables into factors.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.