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 |
x |
A 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 that have been recoded away from, and it has no remaining observations after the recode. |
add |
Set to |
as_factor |
Convert |
arrange |
Set to |
dots |
A named list with either values that can be used with |
Kristian D. Olsen
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.