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

DistributionDecorator

Abstract DistributionDecorator Class


Description

Abstract class that cannot be constructed directly.

Details

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.

Use decorate or $decorate to decorate distributions.

Value

Returns error. Abstract classes cannot be constructed directly.

An R6 object.

Public fields

packages

Packages required to be installed in order to construct the distribution.

Active bindings

methods

Returns the names of the available methods in this decorator.

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
DistributionDecorator$new()

Method decorate()

Decorates the given distribution with the methods available in this decorator.

Usage
DistributionDecorator$decorate(distribution, ...)
Arguments
distribution

Distribution
Distribution to decorate.

...

ANY
Extra arguments passed down to specific decorators.


Method clone()

The objects of this class are cloneable with this method.

Usage
DistributionDecorator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. 1994. “Design Patterns: Elements of Reusable Object-Oriented Software.” Addison-Wesley.


distr6

The Complete R6 Probability Distributions Interface

v1.5.2
MIT + file LICENSE
Authors
Raphael Sonabend [aut, cre] (<https://orcid.org/0000-0001-9225-4654>), Franz Kiraly [aut], Peter Ruckdeschel [ctb] (Author of distr), Matthias Kohl [ctb] (Author of distr), Nurul Ain Toha [ctb], Shen Chen [ctb], Jordan Deenichin [ctb], Chengyang Gao [ctb], Chloe Zhaoyuan Gu [ctb], Yunjie He [ctb], Xiaowen Huang [ctb], Shuhan Liu [ctb], Runlong Yu [ctb], Chijing Zeng [ctb], Qian Zhou [ctb]
Initial release

We don't support your browser anymore

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