| capitalise | R Documentation |
Given a character string or vector of character strings containing words, change the start of each word to a capital letter.
capitalise(s, strict = FALSE)
s |
Character string or vector of character strings. |
strict |
Logical. If |
Each entry of s is split into separate words separated by
the space character. Then the first letter of each word is coerced
to a capital letter using toupper, and if
strict=TRUE, subsequent letters are coerced to lower case
using tolower. Then the words are replaced in
their original positions in s.
A character string or character vector of the same length as s.
Originally documented in base R. Code copied by \adrian.
toupper
a <- c("worKers", "of tHe", "worLd unIte")
capitalise(a)
capitalise(a, TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.