Description Usage Arguments See Also Examples
Add additional levels to a factor
1 | fct_expand(f, ...)
|
f |
A factor (or character vector). |
... |
Additional levels to add to the factor. Levels that already exist will be silently ignored. |
fct_drop()
to drop unused factor levels.
1 2 3 4 | f <- factor(sample(letters[1:3], 20, replace = TRUE))
f
fct_expand(f, "d", "e", "f")
fct_expand(f, letters[1:6])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.