View source: R/SDistribution_Arrdist.R
c.Arrdist | R Documentation |
Helper function for quickly combining distributions into a Arrdist.
## S3 method for class 'Arrdist'
c(..., decorators = NULL)
... |
array distributions to be concatenated. |
decorators |
If supplied then adds given decorators, otherwise pulls them from underlying distributions. |
Arrdist
# create three array distributions with different column names
arr <- replicate(3, {
pdf <- runif(400)
arr <- array(pdf, c(20, 10, 2), list(NULL, sort(sample(1:20, 10)), NULL))
arr <- aperm(apply(arr, c(1, 3), function(x) x / sum(x)), c(2, 1, 3))
as.Distribution(arr, fun = "pdf")
})
do.call(c, arr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.