decorate | R Documentation |
Functionality to decorate R6 Distributions (and child classes) with extra methods.
decorate(distribution, decorators, ...)
distribution |
|
decorators |
|
... |
|
Decorating is the process of adding methods to classes that are not part of the core
interface (Gamma et al. 1994). Use listDecorators
to see which decorators are currently
available. The primary use-cases are to add numeric results when analytic ones are missing,
to add complex modelling functions and to impute missing d/p/q/r functions.
Returns a Distribution with additional methods from the chosen DistributionDecorator.
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. 1994. “Design Patterns: Elements of Reusable Object-Oriented Software.” Addison-Wesley.
listDecorators()
for available decorators and DistributionDecorator for the parent
class.
B <- Binomial$new() decorate(B, "CoreStatistics") E <- Exponential$new() decorate(E, c("CoreStatistics", "ExoticStatistics"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.