Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tbind

Bind Time Series


Description

Bind together (in non-time dimension) two time series objects.

Usage

tbind(x, ..., pad.start=TRUE, pad.end=TRUE, warn=TRUE)
    ## Default S3 method:
tbind(x, ..., pad.start=TRUE, pad.end=TRUE, warn=TRUE)
    ## S3 method for class 'ts'
tbind(x, ..., pad.start=TRUE, pad.end=TRUE, warn=TRUE)

Arguments

x

A time series object.

...

Time series objects.

pad.start

Logical indicating if the start should be truncated or padded with NAs to align time.

pad.end

Logical indicating if the end should be truncated or padded with NAs to align time.

warn

Logical indicating if warnings should be issued.

Details

Bind data as in cbind (or formerly tsmatrix) and align time dimension. The default action pads series with NA to time union. If pad.start and/or pad.end is FALSE and the intersection is empty then NULL is returned and a warning is issued if warn=TRUE.

Value

A time series object

See Also

Examples

tbind(    ts(matrix(rnorm(24),24,1), start=c(1986,1), frequency=4),
    ts(matrix(rnorm(6),  6,1), start=c(1986,1), frequency=4))

tframe

Time Frame Coding Kernel

v2015.12-1.1
GPL-2
Authors
Paul Gilbert <pgilbert.ttv9z@ncf.ca>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.