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 May 29, 2024, 1:28 a.m.