fct_trim | R Documentation |
Trim whitespace from factor levels
fct_trim(f, ...)
f |
A factor variable with whitespace |
... |
Arguments passed on to 'stringr::str_trim()' |
A factor variable with whitespace removed
var <- factor(c(" Level with trailing and leading white space\t", "\n\nLevel with trailing and leading white space\n\n")) fct_trim(var)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.