t(xmax)

Paul Gilbert pgilbert@bank-banque-canada.ca
Thu, 05 Sep 2002 09:50:55 -0400


Extending a recent R help discussion:

> xmat2 <- ts(matrix(rnorm(100),ncol=2))
> end(t(xmat2))
 [1] 50  1
# this implies 50 periods of data
> dim(t(xmat2))
 [1]  2 50
# this implies 2 periods of data on 50 series

(In R 1.5.1 on Solaris.) I think this should be considered a bug in t(),
which probably should not preserve ts attributes. I will file it as a
bug unless there are other opinions. I guess there are other
possibilities (such as, the documentation for the structure of a ts
should be changed), but I think t() preserving the mts and ts class and
attributes will probably break lots of other things.

 Paul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._