revalue_vector | R Documentation |
Similar idea to
pandas.replace
method using a dictionary for the value
argument. Note: only
works with vectors that are of type numeric (including integer) or character.
revalue_vector(x, dict, default_value = NULL, suppress_warnings = FALSE)
x |
character. Name of column to be relabelled |
dict |
a named vector. |
default_value |
default value to use for values in |
suppress_warnings |
bool. A warning is raised if the column to be
relabelled contains values not present in |
A relabelled vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.