Learn R Programming

ribiosUtils (version 1.7.7)

shortenRocheCompoundID: Shorten Roche compounds identifiers

Description

Shorten Roche compounds identifiers

Usage

shortenRocheCompoundID(str)

Value

Character strings of the same length as the input, with all core identifiers shortened

In contrast to rocheCore, which only handles character strings that are valid Roche compound identifiers, this function takes any input string and performs a gsub operation to shorten Roche core numbers. Therefore, it even works when only a substring matches the pattern of a Roche compound name.

Arguments

str

Character strings that contains one or more Roche core identifiers (RO followed by seven-digit numbers)

Examples

Run this code
shortenRocheCompoundID(c("RO1234567-001", "RO1234567-001-000", 
"RO1234567", "ROnoise-001", "anyOther-not-affected", 
"RO1234567 and RO9876543 are two imaginary compounds."))

Run the code above in your browser using DataLab