R/vgrepl.r

#' Function vgrepl
#' 
#' Variant of grepl that takes a vector of patterns.


vgrepl <- function (pattern, x, sumFun = NULL, ...) 
{
    f = Vectorize(grepl, vectorize.arg = "pattern")
    erg = f(pattern = pattern, x = x, ...)
    if (!is.null(sumFun)) 
        erg = sumFun(erg)
    erg
}
AndreasFischer1985/quantqual documentation built on June 20, 2022, 4:55 p.m.