Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

capitalizeStrings

Capitalize strings in a vector


Description

Capitalise first word or all words of a character vector. Lower back of vector element or word, respectively.

Usage

capitalizeStrings(x, all.words = FALSE, lower.back = FALSE)

Arguments

x

[character(n)]
Vector of character elements to capitalize.

all.words

[logical(1)]
If TRUE all words of each vector element are capitalized. FALSE capitalizes the first word of each vector element.

lower.back

[logical(1)]
TRUE lowers the back of each word or vector element (depends on all.words).

Value

Capitalized vector: [character(n)].

Examples

capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!"))
capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!")
, all.words = TRUE, lower.back = TRUE)

BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.