#' Functions
#'
#' @param vec a \code{vector}
#'
#' @return a \code{vector}
#' @importFrom stats sd
#' @export
#'
normal_distribution <- function(vec) {
vec <- as.numeric(vec)
vec[is.na(vec)] <- mean(vec[!is.na(vec)])
norm <- (vec - mean(vec))/sd(vec)
return(norm)
}
normal_zero <- function(vec) {
vec <- as.numeric(vec)
norm <- (vec - vec[1])
return(norm)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.