upFirst {Hmisc} | R Documentation |
Change First Letters to Upper Case
Description
Changes the first letter of each word in a string to upper case, keeping selected words in lower case. Words containing at least 2 capital letters are kept as-is.
Usage
upFirst(txt, lower = FALSE, alllower = FALSE)
Arguments
txt |
a character vector |
lower |
set to |
alllower |
set to |
References
https://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles
Examples
upFirst(c('this and that','that is Beyond question'))
[Package Hmisc version 5.1-3 Index]