Nothing
#' Cumulative means
#'
#' Returns a vector whose elements are the cumulative means of the argument.
#'
#' @param x A numeric object.
#'
#' @return A vector of the same length and type as \code{x} (after coercion).
#' Names are preserved.
#'
#' An \code{NA} value in \code{x} causes the corresponding and following
#' elements of the return value to be \code{NA}, as does integer overflow (with
#' a warning).
#'
#' @export
#'
#' @examples
#' x <- 1:10
#' cummean(x)
#' cumsum(x) / seq_along(x) # equivalent using cumulative sums
cummean <- function(x) {
cumsum(x) / seq_along(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.