[R] extracting columns from a ts series
Uwe Ligges
ligges at statistik.uni-dortmund.de
Tue Sep 25 21:14:54 CEST 2001
On Tue, 25 Sep 2001, Antonio wrote:
> >For Dec columns use
> > window(upwell, start=c(1984, 12), frequency=1)
>
> This works OK
>
> But the other formula not. Maybe is my fault, I was not clear. What I need is:
>
> (Dec(t-1)+Jan(t)+Feb(t)+March(t))/4
Hmm. So the following line should do the trick. I replaced sum() by
mean() --- easy, isn't it?
mean(window(upwell, start=c(1984, 12), end=c(1985,3)))
Uwe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list