prng_from_sample takes an arbitrary sample of data and returns a
pseudo-random number generator.
1 2 | prng_from_sample(x, cdf = ecdf(x), xmin = min(x, na.rm = T), xmax = max(x,
na.rm = T))
|
x |
the sample, an numeric vector |
cdf |
the cdf of the sample's distribution. If unspecified, the
empirical cdf is determined with |
xmin |
the lowest possible value of the sample's distribution.
Defaults to |
xmax |
the highest possible value of the sample's distribution.
Defaults to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.