R/grepFn.R

Defines functions grepFn

Documented in grepFn

grepFn <- function(pattern, x,  column='Function',
       ignore.case=FALSE, perl=FALSE,
       value=TRUE, fixed=FALSE, useBytes=FALSE, invert=FALSE) {
##
## 1.  grep
##
  g <- grep(pattern, x[, column], ignore.case=ignore.case,
            perl=perl, value=FALSE, fixed=fixed,
            useBytes=useBytes, invert=invert)
##
## 2.  value?
##
  {
    if(value)return(x[g, , drop=FALSE]) else return(g)
  }
}

Try the sos package in your browser

Any scripts or data that you put into this service are public.

sos documentation built on June 30, 2024, 1:06 a.m.