crop {eatTools} | R Documentation |
Remove Trailing and Leading Characters From Character Strings
Description
Similarly to the function trim
from the gdata
package, this function
can be used to remove trailing and leading spaces from character strings. However,
in contrast to trim
, any character can be removed by crop
.
Usage
crop(x, char = " ")
Arguments
x |
character string |
char |
character to be removed from beginning and end of |
Author(s)
Martin Hecht, Sebastian Weirich
Examples
str <- c(" 12 kk ", "op j q ", "110")
crop(str)
crop(str, "op")
[Package eatTools version 0.7.6 Index]