correct_case: Correct the case of a vector to be in a preferred case

View source: R/synonym.R

correct_caseR Documentation

Correct the case of a vector to be in a preferred case

Description

Correct the case of a vector to be in a preferred case

Usage

correct_case(x, preferred)

Arguments

x

An object to correct the case of

preferred

A character vector of preferred values

Value

'x' where values that match 'tolower(x) == tolower(preferred)' are converted to the preferred value.

See Also

Other Text standardization: replace_synonym()

Examples

correct_case(c("ABC", "Abc", "aBc", "def"), "Abc")

billdenney/bsd.report documentation built on Jan. 16, 2024, 12:54 a.m.