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 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 > > (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 little or so large that all they really do for us is puff us up and > > make us feel like gods. We are mammals, and have not exhausted the > > annoying little problems of being mammals. > > > > -K. Mullis > > > > ______________________________________________ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > -- > Henrique Dallazuanna > Curitiba-Paraná-Brasil > 25° 25' 40" S 49° 16' 22" O > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.