R/RcppExports.R

Defines functions runmean

Documented in runmean

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title Moving average.
#'
#' @description
#' \code{runmean} computes the moving average of a time series.
#'
#' @details
#' details.
#'
#' @param a Vector of values representing the original time series.
#' @param width The number of values to consider for the average.
#'
#' @return A moving average of the time series.
#'
#' @author Erick A. Chacon-Montalvan
#'
#' @examples
#'
#' x <- 1:10
#' runmean(x, width = 1)
#' runmean(x, width = 2)
#' runmean(x, width = 3)
#'
#' @importFrom Rcpp evalCpp
#'
#' @useDynLib day2day
#'
#' @export
runmean <- function(a, width) {
    .Call('_day2day_runmean', PACKAGE = 'day2day', a, width)
}
ErickChacon/day2day documentation built on May 6, 2019, 4:03 p.m.