Strip text of unwanted characters.
strip.character
- factor method for strip
.
strip.factor
- factor method for strip
.
strip.default
- factor method for strip
.
strip.list
- factor method for strip
.
strip(x, char.keep = "~~", digit.remove = TRUE, apostrophe.remove = FALSE,
lower.case = TRUE)# S3 method for character
strip(x, char.keep = "~~", digit.remove = TRUE,
apostrophe.remove = FALSE, lower.case = TRUE)
# S3 method for factor
strip(x, char.keep = "~~", digit.remove = TRUE,
apostrophe.remove = TRUE, lower.case = TRUE)
# S3 method for default
strip(x, char.keep = "~~", digit.remove = TRUE,
apostrophe.remove = TRUE, lower.case = TRUE)
# S3 method for list
strip(x, char.keep = "~~", digit.remove = TRUE,
apostrophe.remove = TRUE, lower.case = TRUE)
The text variable.
A character vector of symbols (i.e., punctuation) that
strip
should keep. The default is to strip every
symbol except apostrophes and a double tilde "~~"
. The double tilde
"~~"
is included for a convenient means of keeping word groups
together in functions that split text apart based on spaces. To remove
double tildes "~~"
set char.keep
to NULL
.
logical. If TRUE
strips digits from the text.
logical. If TRUE
removes apostrophes from
the output.
logical. If TRUE
forces all alpha characters to
lower case.
Returns a vector of text that has been stripped of unwanted characters.
# NOT RUN { DATA$state #no strip applied strip(DATA$state) strip(DATA$state, apostrophe.remove=TRUE) strip(DATA$state, char.keep = c("?", ".")) # }