R/fastGrep.R
fastGrep.Rd
some fields of interest are lists, and grep per se should not be used -- this function checks and uses grep within vapply when appropriate
fastGrep(patt, onto, field, ...)
a regular expression whose presence in field should be checked
an ontologyIndex instance
the ontologyIndex component to be searched
passed to grep
logical vector indicating vector or list elements where a match is found
cheb = getOnto("chebi_lite")
#> loading from cache
ind = fastGrep("tanespimycin", cheb, "name")
cheb$name[ind]
#> CHEBI:64153
#> "tanespimycin"