convert_custom: Convert Identifiers with Custom Database

View source: R/convert_custom.R

convert_customR Documentation

Convert Identifiers with Custom Database

Description

Convert Identifiers with Custom Database

Usage

convert_custom(x, from = NULL, to = NULL, dt = NULL, multiple = FALSE)

Arguments

x

A character vector to convert.

from

Which identifier type to be converted.

to

Identifier type convert to.

dt

A data.frame as database for conversion.

multiple

if TRUE, return a data.table instead of a string vector, so multiple identifier mappings can be kept.

Value

A character vector.

Examples

dt <- data.table::data.table(UpperCase = LETTERS[1:5], LowerCase = letters[1:5])
dt
x <- convert_custom(c("B", "C", "E", "E", "FF"), from = "UpperCase", to = "LowerCase", dt = dt)
x

IDConverter documentation built on March 31, 2023, 10:25 p.m.