Description Usage Arguments Details Value Examples
Make a reasonable attempt of converting a string into a preferred standard form to name variables and file names
1 | str_sanitize(vnames, sep = "_", no.accent = TRUE)
|
vnames |
character vector to be sanitized |
sep |
character of replacements, Default: '_' |
no.accent |
logical, if is to remove accents from |
str_sanitize() removes or replace the following:
Unix reserved filenames (. and ..)
Trailing periods and spaces (invalid on Windows)
Windows reserved filenames (CON, PRN, AUX, NUL, COM1, COM2,
COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2,
LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9)
any accented noum and punctuation character
any resulting initial or trailing underscore or multiples
uppercase by lowercase
repeated seperator
names starting with a number by a character
a character vector in lowercase with underscore (sep) to separate nouns
1 | str_sanitize(c("esúpido", "^ ãb ", "..c`a§", "A .xls.xls", "1° dia"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.