Re: [Rd] [R] aggregate.ts

2007-07-26 Thread Jeffrey J. Hallman
aggregate.tis() in the fame package does what I think is the right thing: x2 - tis(1:24, start = c(2000, 11), freq = 12) y2 - aggregate(x2, nfreq = 4) x2 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2000 1 2 2001 3 4 5 6 7 8 9

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Paul Gilbert
(moved from r-help) Achim Zeileis wrote: On Wed, 25 Jul 2007, laimonis wrote: Consider the following scrap of code: ...slightly modified to x1 - ts(1:24, start = c(2000, 10), freq = 12) x2 - ts(1:24, start = c(2000, 11), freq = 12) and then y1 - aggregate(x1, nfreq = 4) gives

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Gabor Grothendieck
On 7/25/07, Paul Gilbert [EMAIL PROTECTED] wrote: (moved from r-help) Achim Zeileis wrote: On Wed, 25 Jul 2007, laimonis wrote: Consider the following scrap of code: ...slightly modified to x1 - ts(1:24, start = c(2000, 10), freq = 12) x2 - ts(1:24, start = c(2000, 11),

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Achim Zeileis
Paul, thanks for the feedback. Concerning the zoo side: Currently, the zoo implementation allows this: Coercing back and forth gives: library(zoo) z1 - as.ts(aggregate(as.zoo(x1), as.yearqtr, sum)) z2 - as.ts(aggregate(as.zoo(x2), as.yearqtr, sum)) This is better, but still