R/matmin.R

"matmin" <-
function (...)
{
    x = cbind(...)
    if(!is.numeric(x))
        stop("Input should by numeric.")
    if (!is.matrix(drop(x)))
        x = t(x)
    x[1:nrow(x) + nrow(x) * (max.col(-x) - 1)]
}

Try the geometry package in your browser

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

geometry documentation built on May 29, 2017, 3:15 p.m.