R/rmultnom.R

rmultnom <-
function(N, probs){
	ret = probs * 0
	tab = table(findInterval(runif(N), cumsum(probs)))
	ret[as.numeric(names(tab)) + 1] = tab
	ret
	}

Try the bimetallic package in your browser

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

bimetallic documentation built on May 2, 2019, 1:27 p.m.