ldhmm.sma {ldhmm} | R Documentation |
Simple moving average of a time series
Description
This utility calculates simple moving average, with option to backfill for NA.
Usage
ldhmm.sma(x, order, na.backfill = TRUE)
Arguments
x |
numeric, the time series. |
order |
a positive integer to specify order of moving average. |
na.backfill |
logical, specify whether to backfill for NA. Default is |
Value
numeric, simple moving average, same length as x.
Author(s)
Stephen H. Lihn
Examples
x <- 1:100
a <- ldhmm.sma(x, 10)
[Package ldhmm version 0.6.1 Index]