R/row.matches.R

Defines functions `row.matches`

`row.matches` <-
function(y, X)
{
    i <- seq(nrow(X))
    j <- 0
    
    while(length(i) && (j <- j + 1) <= ncol(X))
    {
        i <- i[X[i, j] == y[j]];
    }
    
    return(i);
}

Try the elrm package in your browser

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

elrm documentation built on Oct. 26, 2021, 9:07 a.m.