View source: R/rat-cap-words.R
rat_cap_words | R Documentation |
Capitalize the first letters of words in a string. Can either use sentence
case (i.e., only the first word capitalized; all = FALSE
) or title case
(i.e., all words capitalized; all = TRUE
).
rat_cap_words(x, all = FALSE)
x |
A character string |
all |
Logical. If |
A character string with the specified capitalization.
name <- c("zip code", "state", "final count")
vapply(name, rat_cap_words, character(1))
vapply(name, rat_cap_words, character(1), all = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.