aboutsummaryrefslogtreecommitdiffstats
path: root/R/ema.R
blob: b4af957ed6dd3699f1f73927a8526fec3dbc6234 (plain)
1
2
3
 ema<-function(x, beta = 0.1, init=x[1]){
filter(beta*x,filter = 1-beta,method = "recursive", init= init)
}