R/which.first.R

which.first = function(x)
{
    if (!is.logical(x)) {
        stop("x not boolean")
    }
    match(TRUE, x)
}

Try the data.table package in your browser

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

data.table documentation built on May 2, 2019, 4:57 p.m.