n = length (cdf)
tmp = runif (1, min=0, max=1)
obs = 1
for (k in 2:n)
if (tmp>cdf[k-1] & tmp<=cdf[k])
obs = k
Any scripts or data that you put into this service are public.
Add the following code to your website.
Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.