Transpose 'timeSeries' objects
base-t.Rd
Returns the transpose of a "timeSeries"
object.
Usage
# S4 method for timeSeries
t(x)
Examples
## Dummy 'timeSeries' with NAs entries
data <- matrix(1:24, ncol = 2)
s <- timeSeries(data, timeCalendar())
s
#> GMT
#> TS.1 TS.2
#> 2024-01-01 1 13
#> 2024-02-01 2 14
#> 2024-03-01 3 15
#> 2024-04-01 4 16
#> 2024-05-01 5 17
#> 2024-06-01 6 18
#> 2024-07-01 7 19
#> 2024-08-01 8 20
#> 2024-09-01 9 21
#> 2024-10-01 10 22
#> 2024-11-01 11 23
#> 2024-12-01 12 24
## Transpose 'timeSeries' -
t(s)
#> [,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