Description Usage Arguments Details
Replace or drop UTF-8 characters and punctuation in headers or/and in char/factor variables.
1 2 3 4 5 6 7 8 9 10 11 12 | clean(x, keep = NULL, add_repl = NULL, ...)
## S3 method for class 'character'
clean(x, keep = NULL, add_repl = NULL)
## S3 method for class 'factor'
clean(x, keep = NULL, add_repl = NULL,
byref = FALSE)
## S3 method for class 'data.frame'
clean(x, col_names = TRUE, vars = FALSE,
keep = NULL, add_repl = NULL, byref = FALSE)
|
x |
chr, factor or data.frame. |
keep |
vector of characters to preserve |
add_repl |
named vector of additional replacements desired. Overrules |
... |
additional parameters to factor and data.frame S3 methods. See details. |
For data.frame's, byref = TRUE
allows to replace characters by reference.
Additionally, booleans col_names
and vars
indicate if replacements should take place in columns names and variables, respectively. By default, col_names = TRUE
and vars = FALSE
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.