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

mergeSeries

Merge Time Indexed Series


Description

Merge two time-indexed series using either the levels or the first differences of the second series where the series overlap.

Usage

mergeSeries(x, y, differences = FALSE, naLoses = FALSE)

Arguments

x, y

tis objects, or objects that can sensibly be coerced to tis by as.tis.

differences

if TRUE, the first differences of series are merged, and then cumulatively summed. The default is FALSE.

naLoses

if TRUE, NA values in y do not overwrite corresponding values in x.

Details

x and y must have the same tif (ti frequency), and the same number of column (if they are multivariate).

Value

A tis object series with start and end dates that span those of x and y. Where the series overlap, values from y are used, except that if naLoses is TRUE, NA values from y do not overwrite non-NA values in x.

See Also


tis

Time Indexes and Time Indexed Series

v1.38
Unlimited
Authors
Jeff Hallman <jeffhallman@gmail.com>
Initial release

We don't support your browser anymore

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