Learn R Programming

distr6 (version 1.5.2)

rep.Distribution: Replicate Distribution into Vector, Mixture, or Product

Description

Replicates a constructed distribution into either a

If the distribution is not a custom Distribution then uses the more efficient distribution/params constructor, otherwise uses distlist.

Usage

# S3 method for Distribution
rep(x, times, class = c("vector", "product", "mixture"), ...)

Arguments

times

(integer(1)) Number of times to replicate the distribution

class

(character(1)) What type of vector to create, see description.

...

Additional arguments, currently unused.

Examples

Run this code
# NOT RUN {
rep(Binomial$new(), 10)
rep(Gamma$new(), 2, class = "product")

# }

Run the code above in your browser using DataLab