#' Calculate the standard deviation
#'
#' @param x Numeric Vector
#'
#' @return Numeric standard deviation
#'
#' @examples
#' L <- 1:20
#' mysd(L)
#'
#' @export
mysd <- function(x){
N <- length(x)
variance <- sum((x - mean(x))^2) / (N - 1)
std <- sqrt(variance)
cat("Variance: ", variance, "\nDeviation: ",std, sep = "")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.