Re: [R] spilting time series

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Tue, 5 Feb 2008 20:14:02 -0200

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 <ssefick_at_gmail.com> 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_at_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

______________________________________________
R-help_at_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.
Received on Tue 05 Feb 2008 - 22:19:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Feb 2008 - 22:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive