combine_levels | R Documentation |
Combine specified old factor Levels in a single new level.
combine_levels(x, levels, new_level = paste(levels, collapse = "/"))
x |
( |
levels |
( |
new_level |
( |
A factor
with the new levels.
x <- factor(letters[1:5], levels = letters[5:1])
combine_levels(x, levels = c("a", "b"))
combine_levels(x, c("e", "b"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.