R/grepvec_leading.R

Defines functions grepvec_leading

Documented in grepvec_leading

## File Name: grepvec_leading.R
## File Version: 0.03


grepvec_leading <- function( patternvec, x, value=FALSE )
{
    NP <- length(patternvec)
    ind <- NULL
    for (vv in 1:NP){
        ind1 <- grep_leading( pattern=patternvec[vv], x )
        ind <- c( ind, ind1 )
    }
    ind <- sort(unique(ind))
    if (value){
        ind <- x[ind]
    }
    return(ind)
}

Try the miceadds package in your browser

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

miceadds documentation built on May 29, 2024, 11:05 a.m.