powered by
empirical_dist
Method for obtaining the sampler for a empirical_dist object.
# S3 method for empirical_dist sampler(x, ...)
A function that takes n and returns n resampled observations.
n
The object to obtain the sampler of.
Additional arguments to pass (not used).
ed <- empirical_dist(c(10, 20, 30)) s <- sampler(ed) set.seed(42) s(5)
Run the code above in your browser using DataLab