Description Usage Arguments Value See Also Examples
Remove levels from a factor, meaning that observations with those levels are set to 'NA'.
1 | fct_remove(f, lvls)
|
f |
A factor |
lvls |
Character vector of levels to remove |
A factor
fct_recode
which can
remove factor levels and fct_explicit_na
which
is the inverse, converting 'NA' to a factor level.
1 2 3 | f <- factor(c("Low", "Medium", "High",
"Refused to respond", "No response", "Not asked"))
fct_remove(f, c("Refused to respond", "No response", "Not asked"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.