Extract core identifiers from Roche compound IDs
rocheCore(str, short = FALSE)
Core identifiers if the element is a Roche compound ID, the original element otherwise Non-character input will be converted to character strings first.
rocheCore(c("RO1234567-001", "RO1234567-001-000", "RO1234567",
"ROnoise-001", "anyOther-not-affected"))
#> [1] "RO1234567" "RO1234567" "RO1234567"
#> [4] "ROnoise-001" "anyOther-not-affected"
rocheCore(c("RO1234567-001", "RO1234567-001-000", "RO1234567",
"ROnoise-001","anyOther-not-affected"), short=TRUE)
#> [1] "RO4567" "RO4567" "RO4567"
#> [4] "ROnoise-001" "anyOther-not-affected"