Nothing
library(checkmate)
gen_random_mat = function(nrows, ncols, type = "surv") {
x = matrix(runif(nrows * ncols), nrow = nrows, ncol = ncols)
if (type == "surv") {
# sort each row in decreasing order => S(t)
t(apply(x, 1, function(row) sort(row, decreasing = TRUE)))
} else if (type == "cdf" || type == "cif") {
# CDF/CIF => increasing values
t(apply(x, 1, function(row) sort(row, decreasing = FALSE)))
} else if (type == "prob" || type == "haz" || type == "dens") {
# no monotonicity requirement, just probabilities
x
} else {
stop("Invalid type")
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.