ma: Simple moving average procedure

Description Usage Arguments Examples

View source: R/ma.R

Description

Apply a moving average procedure on time series

Usage

1
ma(x, window.length)

Arguments

x

any object containing the time series (es. data.frame, ts)

window.length

length of the windows on which averages are computed

Examples

1
2
3
4
5
6
infile <- "test.data"
window.ll <- 20

x <- read.table(infile)
x <- ma(x, window.ll)
write.table(x,file=paste("ma",infile,sep="_"), quote=F, row.names=F, col.names=F)

s-cosseddu/RMD documentation built on May 28, 2019, 10:46 a.m.