R/rmultnom.R

Defines functions rmultnom

Documented in rmultnom

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 30, 2017, 4:32 a.m.