Learn R Programming

tsbox (version 0.4.1)

ts_arithmetic: Arithmetic Operators for ts-boxable objects

Description

Arithmetic Operators for ts-boxable objects

Usage

e1 %ts+% e2

e1 %ts-% e2

e1 %ts*% e2

e1 %ts/% e2

Value

a ts-boxable time series, with the same class as the left input.

Arguments

e1

ts-boxable time series, an object of class ts, xts, zoo, zooreg, data.frame, data.table, tbl, tbl_ts, tbl_time, tis, irts or timeSeries.

e2

ts-boxable time series, an object of class ts, xts, zoo, zooreg, data.frame, data.table, tbl, tbl_ts, tbl_time, tis, irts or timeSeries.

Examples

Run this code
head(fdeaths - mdeaths)
head(fdeaths %ts-% mdeaths)
head(ts_df(fdeaths) %ts-% mdeaths)

Run the code above in your browser using DataLab