Re: [R] Multiple time series and their names

2009-10-03 Thread David Stoffer
That info along with drop=FALSE seems to be a reasonable hack. Thanks again- David Gabor Grothendieck wrote: > > You can use names using your example ts series like this > > x[, "Juan"] > > > On Sat, Oct 3, 2009 at 11:04 AM, David Stoffer > wrote: >> >> Thanks for the help.  My basic prob

Re: [R] Multiple time series and their names

2009-10-03 Thread Gabor Grothendieck
You can use names using your example ts series like this x[, "Juan"] On Sat, Oct 3, 2009 at 11:04 AM, David Stoffer wrote: > > Thanks for the help.  My basic problem is that I have given my series names, > but I still have to call them number 1, 2, and so on, to do things with > them.  If I wa

Re: [R] Multiple time series and their names

2009-10-03 Thread David Stoffer
Thanks for the help. My basic problem is that I have given my series names, but I still have to call them number 1, 2, and so on, to do things with them. If I want to compare "GNP" with "Private Investment", I have to remember which columns contains those series. The concern I have is that I'm

Re: [R] Multiple time series and their names

2009-10-02 Thread Gabor Grothendieck
zoo objects can have one column with a heading and convert back faithfully to ts: > library(zoo) > as.zoo(x)[, 1, drop = FALSE] Juan 1(1) -0.37415224 1(2) -0.30875111 1(3) -0.02617545 1(4) -0.45053564 2(1) 0.15173749 2(2) 1.38545761 2(3) 2.11594058 2(4) -0.84970010 3(1) -0.05944844

[R] Multiple time series and their names

2009-10-02 Thread David Stoffer
Suppose I have multiple time series with names for each one, for example, x <- ts(matrix(rnorm(30,0,1),10,3), names=c("Juan", "Tuey", "Trey"), frequency=4) So now, as I start to explore these series, if I do everything at once, the names stay attached to the series. For example, plot(x) # gives