Re: [R] dynamic runSum

2014-08-08 Thread Gabor Grothendieck
On Thu, Aug 7, 2014 at 9:32 AM, amarjit chandhial wrote: > Hello, > runSum calculates a running sum looking back a fixed distance n, e.g. 20. > How do I calculate a dynamic runSum function for an xts object? > In > otherwords, I want to calculate a running sum at each point in time > looking back

[R] dynamic runSum

2014-08-07 Thread amarjit chandhial
Hello, runSum calculates a running sum looking back a fixed distance n, e.g. 20. How do I calculate a dynamic runSum function for an xts object? In otherwords, I want to calculate a running sum at each point in time looking back a variable distance. In this example, values governed by the vect