#' Calculate the distance between the minimum and maximum values
#'
#' \code{span} calculates the distance between a vector's minimum and maximum
#' values. Only finite and non-NA values are considered.
#'
#' @export
#' @examples
#' vals <- sample(1:100, 10)
#' span(vals)
#'
span <- function(n) {
diff(range(n, na.rm = TRUE, finite = TRUE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.