[R] Yet another help needed
Guojun Zhu
shmilylemon at yahoo.com
Mon May 1 04:31:35 CEST 2006
I have a big data.frame with abou 20 column and 60,000
rows for analyze. Let us say I had a column "a". I
want to generate a new column which value should be
the average of the 60 a before the current column.
Let us say very row is time t_i. I need to calculate
a(t_(i-60))+a(t(i-59)+...+a(t(i-1)). Also I want to
get another number by run regression of
a(t(i-60)),..., a(t(i-1)) on b(t(i-60)),...,b(t(i-1)).
Is there any simple densed code for this? Thanks.
More information about the R-help
mailing list