View source: R/fix_name_labels.R
fix_name_labels | R Documentation |
Fixes if a factor list does not have named levels or has special characters in the names
fix_name_labels(x, pattern = NA, replacement = ".")
x |
the vector or list to fix |
pattern |
regex pattern to replace; defaults to non-word characters and the value of faux_options("sep") (default = _) |
replacement |
the character to replace; defaults to . (or _ if faux_options("sep") == ".") |
a named list with fixed names
source <- list("full.stop", " space ", "under_score", "plus+", "dash-", "tab\t", "line\nbreak")
fix_name_labels(source)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.