Skip to content
Prev 326092 / 398503 Next

using "rollapply" to calculate a moving sum or running sum?

On Thu, Jun 27, 2013 at 3:00 PM, Anika Masters <anika.masters at gmail.com> wrote:
rollapply works column at a time (not row at a time) so try this:

 t( rollapply( t(mymatrix), 12, sum ) )

--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com