search for: bmthree

Displaying 1 result from an estimated 1 matches for "bmthree".

Did you mean: bitree
2017 Jul 22
1
3-day moving average for block maxima
Dear r-users, I would like to construct 3-day moving average for block maxima series. I tried this: bmthree <- lapply(split(dt, dt$Year), function(x) max(sapply(1:(nrow(x)-2), function(i) with(x, mean(Amount[i:(i+2)],na.rm=TRUE))))) bmthree and got the following output. $`1971` [1] 70.81667 $`1972` [1] 68.94553 $`1973` [1] 102.7236 $`1974` [1] 73.6625 $`1975` [1] 92.98889 $`...