Learn R Programming

MicroMoB (version 0.1.2)

draw_multinom: Draw a multinomially distributed random vector

Description

Warning: this function does no argument checking. Ensure the arguments are as follows.

Usage

draw_multinom(n, prob)

Value

an integer vector of length equal to the length of prob

Arguments

n

an integer giving the number of balls to distribute in bins

prob

a vector of probabilities for each bin, which must sum to one