movingAverage {RareVariantVis} | R Documentation

## Computation of moving average

### Description

Function calculates moving average from a vector of numeric values.

### Usage

    movingAverage(x, n, centered)

### Arguments

`x` | a vector of numeric values for which moving average is computed
`n` | numeric value giving the frame length for moving average
`centered` | logic variable indicating if moving average should be centered (default = FALSE)

### Value

`comp1` | function returns vector of moving average values

### Author(s)

Winston Chang

### Examples

    movingAverage(1:20, n=3, centered=FALSE)

[Package RareVariantVis version 2.10.0 Index]