str_clean | R Documentation |
Remove punctuation and/or accent from a string.
str_clean(string, remove_accent = TRUE, remove_punct = TRUE, sub_punct = "")
string |
A character vector |
remove_accent |
A boolean value, if TRUE the function will remove accent symbols from the string (default = TRUE) |
remove_punct |
A boolean value, if TRUE the function will remove punctuation symbols from the string (default = TRUE) |
sub_punct |
A character single value (default = ”), that will be replacement for the punctuation symbols |
A character vector.
string <- "a..;éâ...íõ"
#remove only punctuation
str_clean(string,remove_accent = FALSE,remove_punct = TRUE)
#remove only accent
str_clean(string,remove_accent = TRUE,remove_punct = FALSE)
#remove both
str_clean(string)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.