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 May 31, 2023, 7:46 p.m.