base-t: timeSeries Transpose

Description Usage Arguments Value Examples

Description

Returns the transpose of a 'timeSeries' object.

Usage

1
2
## S4 method for signature 'timeSeries'
t(x)

Arguments

x

a 'timeSeries' object.

Value

Returns a matrix object.

Examples

1
2
3
4
5
6
7
## Dummy timeSeries with NAs entries
   data <- matrix(1:24, ncol = 2)
   s <- timeSeries(data, timeCalendar())
   s
   
## Transpose 'timeSeries' -
   t(s)

Example output

Loading required package: timeDate
GMT
           TS.1 TS.2
2020-01-01    1   13
2020-02-01    2   14
2020-03-01    3   15
2020-04-01    4   16
2020-05-01    5   17
2020-06-01    6   18
2020-07-01    7   19
2020-08-01    8   20
2020-09-01    9   21
2020-10-01   10   22
2020-11-01   11   23
2020-12-01   12   24
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
TS.1    1    2    3    4    5    6    7    8    9    10    11    12
TS.2   13   14   15   16   17   18   19   20   21    22    23    24

timeSeries documentation built on Jan. 25, 2020, 1:07 a.m.