Re: [R] spilting time series

2008-02-05 Thread Henrique Dallazuanna
Ops, I think is this you want lapply(c("head", "tail"), function(.x)as.ts(apply(a, 2, .x, nrow(a)/2))) On 05/02/2008, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > Try this: > > lapply(split(a, rep(1:2, each=nrow(x)/2)), ts, start=start(a), > freq=frequency(a)) > > > On 04/02/2008, stephen s

Re: [R] spilting time series

2008-02-05 Thread Henrique Dallazuanna
Try this: lapply(split(a, rep(1:2, each=nrow(x)/2)), ts, start=start(a), freq=frequency(a)) On 04/02/2008, stephen sefick <[EMAIL PROTECTED]> wrote: > I have a time series object with two columns. > > a <- ts(x, frequency=1/15) > I would like to split this into two time series of the same length

[R] spilting time series

2008-02-04 Thread stephen sefick
I have a time series object with two columns. a <- ts(x, frequency=1/15) I would like to split this into two time series of the same length (they are the same number of observations lined up time for time already). -- Let's not spend our time and resources thinking about things that are so littl