Description Usage Arguments Value Examples
View source: R/recode_helpers.R
Get recode assigments for even intervals of discrete numeric values compatible with car::recode.
1 | generate_recodes(from, to, width = 5)
|
from, to |
A |
width |
The width of the interval, e.g. 5 (default) for intervals 0-5. |
A character
vector of recode assignments compatible with car::recode.
1 2 3 4 5 6 7 8 | ## Not run:
x <- round(runif(100, 0, 100), 0)
recodes <- generate_recodes(0, 100, 10)
library(car)
recode(x, recodes = recodes)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.