Description Usage Arguments Details Value See Also Examples
Family of functions for testing whether strings are of the specified type.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | str_is(string, type, autostart = 30L)
str_is_all(...)
make_str_is(type)
make_str_are(type)
str_are_uppercase(string)
str_are_upper_case(string)
str_are_uppercase(string)
str_are_upper_case(string)
|
string |
vector. This must be an atomic vector, and will be coerced to a character vector |
type |
function that transforms the string to type |
autostart |
integer; number of elements to test before concluding that
|
... |
arguments passed to subsequent functions |
str_is
determines if the string belongs to one of the supported
lettercase types. Comparisons are made by comparing the original string
to a transformed version of the string. If the two are identical, then
the functions are equivalent.
autostart
determines the maximum number of values
make_str_is
and make_string_are
are metafunctions that return
functions that test for the given lettercase types.
For str_is
a logical vector indicating which entries of string
are of the specified type
,
For str_is_all
and str_are
a logical vector of length one
indicating whether all of string
is of the specified type(s)
For make_str_is
and make_str_are
functions that return
functions that accept a single argument and return whether the string is of
the specified types.
str_transform
make_str_replace
make_str_delete
1 2 3 4 5 6 7 8 9 10 11 | string = c( "catch-22", "finnegans wake" )
str_is( string, str_lower_case )
str_transform( string, str_capitalize, str_delete_nonword )
str_delete_nonword( str_capitalize( string ) ) # SAME
# magrittr:
## Not run:
string %>% str_capitalize %>% str_delete_nonword # SAME
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.