Description Usage Arguments Value Note Author(s) Examples
capply
Apply function to elements in character vector (utility function)
cap
and capitalize
change to capital letters.
lower
and lowerize
change to lower case letters.
CapLeading
Capitalizes the first character of each element of a
character vector
1 2 3 4 5 6 7 | capply(str,ff,...)
cap(char)
capitalize(str)
lower(char)
lowerize(str)
CapLeading(str)
strReverse(str)
|
str |
a character vector. |
ff |
a function. |
... |
additional parameters for function ff. |
char |
a single letter. |
strReverse |
the reverse of |
The same type as the argument.
capply has been reverse engineered from the help page on strsplit. strReverse <- function(x) capply( x, rev )
Christian W. Hoffmann <christian@echoffmann.ch>
1 2 3 4 5 6 7 | # capitalize shows the use of capply
cap("f") # "F"
capitalize(c("TruE","faLSe")) # "TRUE" "FALSE"
lower("R") # "r"
lowerize("TruE") # "true"
CapLeading(c("all you ","need")) # "All you " "Need"
capply(c("abc", "elephant"), rev) # "cba" "tnahpele"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.