harmonize: Harmonize Case

View source: R/utils.R

harmonizeR Documentation

Harmonize Case

Description

Convert text to the most occuring case. In case of ties, the first occurence in sorted order will be taken.

Usage

harmonize(x)

Arguments

x

character vector

Value

character vector with harmonized names (i.e., same case)

Examples

 x <- c("FOO", "Foo", "bar", "FOO", "bar", "FOO", "Bar")
 y <- harmonize(x)
 stopifnot(all.equal(y, c("FOO", "FOO", "bar", "FOO", "bar", "FOO", "bar")))
 

benthos documentation built on Aug. 22, 2022, 5:07 p.m.