Description Usage Arguments Author(s) Examples
A simple function for recoding, which aims to replace nested ifelse
statements.
Typical use cases include; recoding numeric vectors into a factor, merging factor levels in
an existing factor, and more.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
The vector to be recoded. |
... |
Named arguments with the criteria for the recodes. In essence |
by |
The vector to recode values in |
drop |
Drop factor levels after recode. Will only remove levels that have no remaining observations after being explicitly recoded away from. |
add |
Set to |
factor |
Convert |
arrange |
Set to |
dots |
A named list with either values that can be used with |
small |
Set to |
Kristian D. Olsen
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.