Learn R Programming

qdap (version 0.2.5)

capitalizer: Capitalize Select Words

Description

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

Usage

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab