Description Usage Arguments Value
For swapping out one factor for another (e.g. numerical code to actual sentences in response).
1 2 |
df |
dataframe, dataframe with factors being swapped. |
columns |
vector, identifies columns containing factors to swap. |
original_factors |
vector, gives factors to swap. |
new_factors |
vector, gives replacements for original_factors. |
addNA |
logical or string, if not NULL, replaces NAs with string. |
A dataframe like df
, but with original_factors
in columns
replaced by new_factors
(and NAs replaced with addNA
if addNA
used).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.