Skip to content
Prev 6919 / 15274 Next

picking up the current index plus n -1, n-2, ..., n-20

Hi Stephen,

If you want to calculate moving averages, take a look at the TTR
package.  For applying any function over a rolling time window, see
rollapply in the zoo package.

R-help is a better venue if you simply want to understand how to do it
will apply, since it's not strictly finance-related.

Best,
--
Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com



On Wed, Nov 10, 2010 at 9:28 PM, Stephen Choularton
<stephen at organicfoodmarkets.com.au> wrote: