[R] multiple time series

Banachewicz KP konradb at fluit.cs.vu.nl
Mon Sep 27 04:50:06 CEST 2004


thanks Dirk, I missed the obvious z[,i] option (shame on me ;-(
however, when I tried to use z$foo I get a NULL, despite the fact that
this particular column is not empty. any idea why ?

					rg,

					Konrad

On Sun, 26 Sep 2004, Dirk Eddelbuettel wrote:
> It works the usual way:>
> > z <- ts(matrix(rnorm(300), 100, 3), start=c(1961, 1), frequency=12)
> > colnames(z) <- c("foo","bar","boo")
> > summary(z[,"boo"])
>     Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
> -1.92700 -0.79140 -0.08982 -0.10660  0.54350  2.32600
> >
>
> You could also use z$foo, or z[,1] -- i.e. it works just like the data frames.
>
> Dirk
>
> --
> Those are my principles, and if you don't like them... well, I have others.
>                                                 -- Groucho Marx
>




More information about the R-help mailing list