From nicolas.georges at us.calyon.com  Thu Jul 24 16:39:07 2008
From: nicolas.georges at us.calyon.com (NicoNYC)
Date: Thu, 24 Jul 2008 07:39:07 -0700 (PDT)
Subject: [Rd] How to loop through a set of data and to evaluate a function?
Message-ID: <18633260.post@talk.nabble.com>


Hi,
I will explain my problem :
I would like to loop through a set of data taking the set 100 points at a
time.  At each iteration I'd like to evaluate a function over this set.  In
each subsequent iteration i add the next point to my sub set and remove the
oldest and evaluate the function again (something like a moving window).

Small example : this is my data:
1
2
3
..
10

with a moving window of 3 points, i would like to evaluate the following
f(1,2,3)
f(2,3,4)
f(3.4.5)
...
f(8,9,10)

Thank you!
-- 
View this message in context: http://www.nabble.com/How-to-loop-through-a-set-of-data-and-to-evaluate-a-function--tp18633260p18633260.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] How to loop through a set of data and to evaluate a function?
NicoNYC