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.

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

Arguments

x

Distribution

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

rep(Binomial$new(), 10)
#> Binom1 Binom2 ... Binom9 Binom10 
rep(Gamma$new(), 2, class = "product")
#> Gamma1 X Gamma2