View source: R/SDistribution_Matdist.R
c.Matdist | R Documentation |
Helper function for quickly combining distributions into a Matdist.
## S3 method for class 'Matdist' c(...)
... |
matrix distributions to be concatenated. |
Matdist
# create three matrix distributions with different column names mats <- replicate(3, { pdf <- runif(200) mat <- matrix(pdf, 20, 10, FALSE, list(NULL, sort(sample(1:20, 10)))) mat <- t(apply(mat, 1, function(x) x / sum(x))) as.Distribution(mat, fun = "pdf") }) do.call(c, mats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.