Skip to contents

some fields of interest are lists, and grep per se should not be used – this function checks and uses grep within vapply when appropriate

Usage

fastGrep(patt, onto, field, ...)

Arguments

patt

a regular expression whose presence in field should be checked

onto

an ontologyIndex instance

field

the ontologyIndex component to be searched

...

passed to grep

Value

logical vector indicating vector or list elements where a match is found

Examples

cheb = getOnto("chebi_lite")
#> loading from cache
ind = fastGrep("tanespimycin", cheb, "name")
cheb$name[ind]
#>    CHEBI:64153 
#> "tanespimycin"