cap_a_word_partial: Cap a Word, Partial

Description Usage Arguments Examples

View source: R/cap_a_word_partial.R

Description

Find part of a word and make it full caps.

Usage

1
cap_a_word_partial(phrase, to_cap = c("id", "Id"))

Arguments

phrase

A single element or phrase containing one or more of the elements in 'to_cap'

to_cap

A vector of words that, if contained in 'phrase', will be fully capitalized.

Examples

1
2
3
4
5
6
cap_a_word_partial("this_id")
cap_a_word_partial("this Id")
cap_a_word_partial("thisid")

words_to_cap <- c("Petal", "Width")
purrr::map(names(iris), cap_a_word_partial, words_to_cap)

aedobbyn/dobtools documentation built on May 28, 2019, 2:33 a.m.