# NOT RUN {
pdf <- runif(200)
mat <- matrix(pdf, 20, 10)
mat <- t(apply(mat, 1, function(x) x / sum(x)))
colnames(mat) <- 1:10
d <- as.Distribution(mat, fun = "pdf")
plot(d, "pdf", xlab = "x", ylab = "p(x)")
plot(d, "cdf", xlab = "x", ylab = "F(x)")
plot(d, "survival", xlab = "x", ylab = "S(x)")
plot(d, "hazard", xlab = "x", ylab = "h(x)")
plot(d, "cumhazard", xlab = "x", ylab = "H(x)")
# }
Run the code above in your browser using DataLab