Skip to content
Back to formatted view

Raw Message

Message-ID: <E17x8TU-0006rX-00@server.family>
Date: 2002-10-03T16:05:16Z
From: FWR
Subject: Convert daily to weekly ts ?
In-Reply-To: <20021003073557.B17918@camille.indigoindustrial.co.nz>

Thanks to Jason Turner and others for their comments. 

I still have to decide whether the calendar (POSIXt) based week-of-year aggregates, or the constant 7-day aggregates (using aggregate.ts), are more appropriate for what I want to do with these several years of daily data. 

In my case, the POSIXt based week-of-year calculations end up with a less than 7 day aggregate at the beginning and end of each year, sometimes only one day is used in the aggregation. The week-of-year starts not on 1-Jan but on the first Sunday of January. There are a varying number of weeks in any given year.

What I want is to break up each year separately into exactly 52 equal-length intervals and obtain an average property over each interval. 

Unfortunately, aggregate.ts requires that 52 be evenly divisible into #days/year . It doesn't do interpolations. I might be able to fudge it with the eps parameter ... or just randomly throw out 1 or 2 days per year.

Wishlist: that aggregate.ts that could use interpolation methods to change frequencies.

Thanks,
Bruce L.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._