obo_prefix: Extract the OBO ontology prefix from IRIs

View source: R/term-type.R

obo_prefixR Documentation

Extract the OBO ontology prefix from IRIs

Description

Extract the OBO ontology prefix from IRIs

Usage

obo_prefix(x)

Arguments

x

a list or vector of IRIs, and/or objects that have an "id" key.

Value

A character vector of the same length as the input vector or list, with NA in the positions where extracting the OBO ontology prefix failed.

Examples

tt <- c("http://purl.obolibrary.org/obo/UBERON_0011618",
        "http://purl.obolibrary.org/obo/PATO_0002279",
        "http://purl.obolibrary.org/obo/VTO_0071642",
        "http://purl.obolibrary.org/obo/MP_0030825",
        "http://purl.obolibrary.org/obo/NCBITaxon_7955")
obo_prefix(tt)

xu-hong/rphenoscape documentation built on Jan. 28, 2024, 12:22 p.m.