trim.space {rapportools} | R Documentation |
Trim Spaces
Description
Removes leading and/or trailing space(s) from a character vector. By default, it removes both leading and trailing spaces.
Usage
trim.space(
x,
what = c("both", "leading", "trailing", "none"),
space.regex = "[:space:]",
...
)
Arguments
x |
a character vector which values need whitespace trimming |
what |
which part of the string should be trimmed. Defaults to |
space.regex |
a character value containing a regex that defines a space character |
... |
additional arguments for |
Value
a character vector with (hopefully) trimmed spaces
[Package rapportools version 1.1 Index]