clean_whitespace {arkhe} | R Documentation |
Remove Leading/Trailing Whitespace
Description
Remove Leading/Trailing Whitespace
Usage
clean_whitespace(x, ...)
## S4 method for signature 'data.frame'
clean_whitespace(x, which = c("both", "left", "right"), squish = TRUE)
## S4 method for signature 'matrix'
clean_whitespace(x, which = c("both", "left", "right"), squish = TRUE)
Arguments
x |
An R object (should be a |
... |
Currently not used. |
which |
A |
squish |
A |
Author(s)
N. Frerebeau
See Also
Other data cleaning tools:
remove_Inf()
,
remove_NA()
,
remove_constant()
,
remove_empty()
,
remove_zero()
,
replace_Inf()
,
replace_NA()
,
replace_empty()
,
replace_zero()
Examples
x <- data.frame(
A = c(" Both ", " Left", "Right "),
B = 1:3
)
clean_whitespace(x, which = "both")
clean_whitespace(x, which = "left")
clean_whitespace(x, which = "right")
[Package arkhe version 1.7.0 Index]