capitalizer: Capitalize Select Words

Description Usage Arguments Value Note Examples

View source: R/capitalizer.R

Description

A helper function for word_list that allows the user to supply vectors of words to be capitalized.

Usage

1
capitalizer(text, caps.list = NULL, I.list = TRUE, apostrophe.remove = FALSE)

Arguments

text

A vector of words (generally from bag_o_words or breaker).

caps.list

A list of words to capitalize.

I.list

logical. If TRUE capitalizes I words and contractions.

apostrophe.remove

logical, asking if apostrophes have been removed. If TRUE will try to insert apostrophe's back into words appropriately.

Value

Returns a vector of capitalized words based on supplied capitalization arguments.

Note

Not intended for general use. Acts as a helper function to several qdap functions.

Examples

1
2
3
4
5
## Not run: 
capitalizer(bag_o_words("i like it but i'm not certain"), "like")
capitalizer(bag_o_words("i like it but i'm not certain"), "like", FALSE)

## End(Not run)

trinker/qdap documentation built on Sept. 30, 2020, 6:28 p.m.