[R] mean over previous cells

clion birte_2 at hotmail.com
Fri Feb 20 09:38:23 CET 2009


Dear RUsers,
I guess this is an easy question for someone a little familiar with
programming...(which I am not)...

I've got 2 colummns, one shows just dates(SST_date, Class 'Date' num), the
other one shows the SeaSurfaceTemperature (SST, num) at that certain date.

SST_date    SST 
2008-01-01 22.2 
2008-01-02 21.8
2008-01-03 22.8
2008-01-04 22.9
2008-01-05 23.1
2008-01-06 23.2  
...
...

now, I would like to add a column that shows the mean SST over the last
(e.g.) 60 days (for that specific date).

My biological question is, whether the birthweight of an animal at a
specific birthdate changes due to the SST over the last 60 days before
birth. (SST is an indicator for food abundance - if food is scarce, mothers
can't feed much and hence, pups are born lighter!?)
Up to now, I can only show, whether the SeaSurfaceTemperatures on the
birthdate can have an influence on birthweight, which is not what I want to
do...

Can anybody tell me, how to start, where to look it up or help me even more? 
thanks in advance.
Birte

-- 
View this message in context: http://www.nabble.com/mean-over-previous-cells-tp22116807p22116807.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list