capwords: Capitalize the first letter of a character string.

Description Usage Arguments Examples

View source: R/capwords.r

Description

Capitalize the first letter of a character string.

Usage

1
capwords(s, strict = FALSE, onlyfirst = FALSE)

Arguments

s

A character string

strict

Should the algorithm be strict about capitalizing. Defaults to FALSE.

onlyfirst

Capitalize only first word, lowercase all others. Useful for taxonomic names.

Examples

1
2
capwords(c("using AIC for model selection"))
capwords(c("using AIC for model selection"), strict=TRUE)

sckott/sacbox documentation built on Sept. 3, 2020, 7:22 p.m.