simplewords | R Documentation |
Takes a vector with character elements, removes special characters and numbers and formats them to UTF-8 encoding to make these consistent and compatible with most R analysis procedures. Returns strings with the first letter capitalised and the rest in lower case
simplewords(x, case, encode = TRUE)
x |
string or character vector |
case |
Optional; case of words to return; upper, lower or title (first letter upper case and the rest lower case). Default is title |
encode |
Optional; Logical; attempt to encode as UTF-8. Default is TRUE. |
Returns the input in UTF-8 format with special characters replaced with spaces and numbers removed.
Diane Hatziioanou
# strings <- simplewords(strings)
# clean_name <- simplewords("Latin-multi^name with strange/characters")
# df$Name <- simplewords(df$Name, case = "lower")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.