strip {qdap} | R Documentation |
Strip Text
Description
Strip text of unwanted characters.
Usage
strip(
x,
char.keep = "~~",
digit.remove = TRUE,
apostrophe.remove = TRUE,
lower.case = TRUE
)
## S3 method for class 'character'
strip(
x,
char.keep = "~~",
digit.remove = TRUE,
apostrophe.remove = TRUE,
lower.case = TRUE
)
## S3 method for class 'factor'
strip(
x,
char.keep = "~~",
digit.remove = TRUE,
apostrophe.remove = TRUE,
lower.case = TRUE
)
## Default S3 method:
strip(
x,
char.keep = "~~",
digit.remove = TRUE,
apostrophe.remove = TRUE,
lower.case = TRUE
)
## S3 method for class 'list'
strip(
x,
char.keep = "~~",
digit.remove = TRUE,
apostrophe.remove = TRUE,
lower.case = TRUE
)
Arguments
x |
The text variable. |
char.keep |
A character vector of symbols (i.e., punctuation) that
|
digit.remove |
logical. If |
apostrophe.remove |
logical. If |
lower.case |
logical. If |
Value
Returns a vector of text that has been stripped of unwanted characters.
See Also
Examples
## Not run:
DATA$state #no strip applied
strip(DATA$state)
strip(DATA$state, apostrophe.remove=FALSE)
strip(DATA$state, char.keep = c("?", "."))
## End(Not run)
[Package qdap version 2.4.6 Index]