| cap {cwhstring} | R Documentation |
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
capply(str,ff) cap(char) capitalize(str) lower(char) lowerize(str) CapLeading(str)
ff |
a function. |
char |
a single letter. |
str |
a character vector. |
The same as the argument.
capply has been reverse engineered from the help page on strsplit: strReverse <- function(x) sapply(lapply(strsplit(x, NULL), rev), paste, collapse="") can be written as capply(x, rev)
Christian W. Hoffmann, christian.hoffmann@wsl.ch, http://www.wsl.ch/staff/christian.hoffmann
capitalize # show use of capply
cap("f")
capitalize(c("TruE","faLSe"))
lower("R")
lowerize("TruE")
CapLeading(c("all you ","need")) # [1] "All you " "need"
capply(c("abc", "Statistics"), rev) # reverse strings