#' @title Compute confidence interval around mean using normal approximation
#' @param x
mean_ci <- function(x, conf = 0.95) {
se <- sd(x) / sqrt(length(x))
alpha <- 1 - conf
mean(x) + se * qnorm(c(alpha / 2, 1 - alpha / 2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.