upFirst

0th

Percentile

Change First Letters to Upper Case

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 TRUE to make only the very first letter of the string upper case, and to keep words with at least 2 capital letters in their original form
alllower
set to TRUE to make every word start with lower case unless it has at least 2 caps
References

http://lanecc.libguides.com/content.php?pid=38483&sid=295540, http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles, http://titlecapitalization.com

Aliases
  • upFirst
Examples
upFirst(c('this and that','that is Beyond question'))
Documentation reproduced from package Hmisc, version 4.0-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.