Hello,

   I have a question on how to tabulate the time series data. I use
RStudio, but if can be done in any other R editor, it should work in
RStudio as well.

> a1<-11:22

> a1ts<-ts(a1, frequency=4, start=c(1978,1))

> a1ts     Qtr1 Qtr2 Qtr3 Qtr4
1978   11   12   13   14
1979   15   16   17   18
1980   19   20   21   22


   If I click the variable "a1ts" on the workspace, I see

structure(11:22, .Tsp = c(1978, 1980.75, 4), class = "ts")

    If I coerce the variable to become a matrix,

> a1tsm<-as.matrix(a1ts)


    and click the variable "a1tsm", I see the vector in a tabular form and
can paste it into Excel , but I don't see the dates at all
  V1
1 11
2 12
3 13
4 14
5 15
6 16
7 17
8 18
9 19
10 20
11 21
12 22

     How could I see both the dates and the data in a tabular form?

     The second question is that if I have another data sequence, how can I
combine the two and see both data in a tabular form?

> a2<-101:116> a2ts<-ts(a2, frequency=4, start=c(1979,1))> a2ts     Qtr1 Qtr2 Qtr3 Qtr4
1979  101  102  103  104
1980  105  106  107  108
1981  109  110  111  112
1982  113  114  115  116

>
Thank you,

Miao

	[[alternative HTML version deleted]]

