powered by
Generate random integer samples from a Categorical distribution.
rCategorical(n, p)
integer, number of samples.
numeric, probabilities.
An integer vector of length n.
dCategorical
# NOT RUN { rCategorical(n=20,p=c(1,2)) # }
Run the code above in your browser using DataLab