[R] Re:Time-Series
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jan 13 14:54:52 CET 2005
On Thu, 13 Jan 2005, Achim Zeileis wrote:
> On Thu, 13 Jan 2005 13:54:43 +0100 (CET) Vito Ricci wrote:
>
>> you can address to a single ts in a multivariate ts
>> object by namets[,index]. See this example:
>
> Note, that index can also be a string and not only the index number. You
> wanted to have the analogue of z$energy which could also be
> z[, "energy"]
The point is that an object of class "mts" is normally a matrix and
certainly matrix-like (ts.union can make a data frame of that class), so
matrix indexing works: see `An Introduction to R' for the details.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list