Sample a categorical variable from an unnormalized proportion
1 | rcategorical(p)
|
p |
a vector of (possoble unnormalized) probabilities to sample from |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.