R/idlastzero.R

idlastzero <-
function (v) 
{
    x <- which(v == 0)
    if (length(x) == 0) 
        stop("Can't find a zero")
    max(x)
}

Try the locits package in your browser

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

locits documentation built on Sept. 8, 2023, 5:07 p.m.