R/upd.prob.R

Defines functions `upd.prob`

`upd.prob` <-
function(samples, v, weight, comp.list)
{
    p <- matrix(0, nrow=nrow(v), ncol=ncol(v))
    s <- nrow(samples)
    p <- apply(samples,2,function(x) 
        table(x)[match(as.character(comp.list), dimnames(table(x))[[1]])]/s)
    p[is.na(p)] <- 0
    (1-weight)*v + weight*p
}

Try the RankAggreg package in your browser

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

RankAggreg documentation built on July 8, 2020, 6:20 p.m.