distributional_wrapper <- function(call, mu, sigma, df) {
if (call == "dist_normal") {
sigma[is.na(sigma)] <- .Machine$double.xmin
return(distributional::dist_normal(mu = mu, sigma = sigma))
}
if (call == "dist_student_t") {
df[is.na(df)] <- 1
sigma[is.na(sigma)] <- .Machine$double.xmin
return(distributional::dist_student_t(mu = mu, sigma = sigma, df = df))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.