t() of a time series (PR#1998)

pgilbert@bank-banque-canada.ca pgilbert@bank-banque-canada.ca
Tue, 10 Sep 2002 15:54:58 +0200 (MET DST)


(In R 1.5.1 )

t() preserves time series attributes but not ts structure:

> 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

The time attributes and ts class should be removed by t().

Paul Gilbert

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._