# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab