[R] How to do a moving window on standard deviation

Pete Brecknock Peter.Brecknock at bp.com
Sun Jan 30 21:41:12 CET 2011

how about ...


for(i in 4: length(xyz$Close)) {
      j[i] = sd(xyz$Close[i-3:i])

View this message in context: http://r.789695.n4.nabble.com/How-to-do-a-moving-window-on-standard-deviation-tp3247566p3247634.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list