Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simplifyr-methods

Methods for Function simplifyr in Package ‘distr’


Description

simplifyr-methods

Methods

simplifyr

signature(.Object = "UnivariateDistribution"): After several transformations of a given distribution it may take quite a long time to generate random numbers from the resulting distribution. simplifyr generates a certain number, by default 10^5, of random numbers once. This pool of random numbers forms the basis for further uses of the r-method. That is, random numbers are generated by sampling with replacement out of this pool.

Note

If you want to generate many random numbers, you should use simplifyr with a big size to be sure, that your numbers are really random.

See Also

Examples

F <- ( Norm() + Binom() + Pois() + Exp() ) * 2 - 10
system.time(r(F)(10^6))
simplifyr(F, size = 10^6)
system.time(r(F)(10^6))

distr

Object Oriented Implementation of Distributions

v2.8.0
LGPL-3
Authors
Florian Camphausen [ctb] (contributed as student in the initial phase --2005), Matthias Kohl [aut, cph], Peter Ruckdeschel [cre, cph], Thomas Stabla [ctb] (contributed as student in the initial phase --2005), R Core Team [ctb, cph] (for source file ks.c/ routines 'pKS2' and 'pKolmogorov2x')
Initial release
2019-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.