R/rMultinom.R

Defines functions rMultinom

Documented in rMultinom

rMultinom <- function(size, prob) {
  return (rowSums(stats::rmultinom(n = size %/% (2 ^ 31 - 1),
      size = 2 ^ 31 - 1, prob = prob)) + as.vector(stats::rmultinom(n = 1,
      size = size %% (2^31-1), prob = prob)))
}

Try the TDA package in your browser

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

TDA documentation built on March 30, 2021, 5:10 p.m.