capwords: Capitalizing

Description Usage Arguments Value Author(s) Examples

Description

Capitalizing - every first letter of a word is changed to upper case.

Usage

1
capwords(s, strict = FALSE)

Arguments

s

A character vector, or an object that can be coerced to character by as.character.

strict

Logical: other letters than the first are converted to lower case

Value

A character vector of the same length and with the same attributes as x (after possible coercion).

Author(s)

From the help page of chartr

Examples

1
2
3
4
5
6
capwords(c("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'

basille/basr documentation built on May 11, 2019, 8:32 p.m.