R/grep_leading.R

Defines functions grep_leading

Documented in grep_leading

## File Name: grep_leading.R
## File Version: 0.06


grep_leading <- function( pattern, x, value=FALSE )
{
    ind <- which( substring( x, 1, nchar(pattern) )==pattern )
    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.