R/rmult.R

Defines functions `rmult`

`rmult` <-
function(n=1, sspace, prob){
	prob <- prob/sum(prob)
	r <- runif(1)
	sspace[length(sspace)-sum(r < cumsum(prob))+1]
}

Try the RankAggreg package in your browser

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

RankAggreg documentation built on May 2, 2019, 5:48 a.m.