capwords | R Documentation |
Change case to capitalize first letter of each word in a character string.
capwords(x, strict = FALSE)
x |
A character string in the form of a sentence to be converted to "title case" (i.e. first letter capitalized). |
strict |
Logical. Should first letter capitalization be strictly applied? See example. |
A character string with "title case" conversion.
Stu Field
toupper()
, tolower()
, strsplit()
capwords("using AIC for model selection") ## -> [1] "Using AIC For Model Selection" capwords(c("using AIC", "for MODEL selection"), strict = TRUE) ## -> [1] "Using Aic" "For Model Selection" ## ^^^ ^^^^^ ## "bad" "good"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.