R/selectnhighest.R

selectnhighest <-
function(dif, inputter, nlim) {
    rnk <- rank(dif)
    if (length(nlim) > length(inputter)) {
        stop(paste("cannot rake on", nlim, "variables.  Too few targets specified"))
    }
    found <- inputter[rnk <= nlim]
    found
}

Try the anesrake package in your browser

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

anesrake documentation built on May 2, 2019, 1:42 p.m.