ts_c: Collect Time Series

Description Usage Arguments Details Value See Also Examples

View source: R/ts_c.R

Description

Collect time series as multiple time series.

Usage

1

Arguments

...

ts-boxable time series, objects of class ts, xts, data.frame, data.table, or tibble.

Details

In data frame objects, multiple time series are stored in a long data frame. In ts and xts objects, time series are combined horizontally.

Value

a ts-boxable object of the same class as the input. If series of different classes are combined, the class of the first series is used (if possible).

See Also

ts_bind, to bind multiple time series to a single series.

Examples

1
2
3
4
5
6
7
8
head(ts_c(ts_df(EuStockMarkets), AirPassengers))

# labeling
x <- ts_c(
  `International Airline Passengers` = ts_xts(AirPassengers),
  `Deaths from Lung Diseases` = ldeaths
)
head(x)

christophsax/tsbox documentation built on June 26, 2018, 1:13 p.m.