Last data update: 2014.03.03
|
R: str_transform
str_transform | R Documentation |
str_transform
Description
Convert a string by applying one or more str_* functions.
Usage
str_transform(string, ...)
Arguments
string |
vector. This must be an atomic vector, and will be coerced to
a character vector
|
... |
one or more functions to apply to the string
|
Details
str_transform applies successive functions to its first argument,
string .
Value
a character vector
See Also
make_str_replace
make_str_delete
Examples
string = c( "catch-22", "finnegans wake" )
str_transform( string, str_capitalize )
str_transform( string, str_capitalize, str_delete_nonword )
str_delete_nonword( str_capitalize( string ) ) # SAME
## Not run:
# magrittr:
string %>% str_capitalize %>% str_delete_nonword # SAME
## End(Not run)
Results
|