Learn R Programming

TSstudio (version 0.1.7)

ts_sum: Summation of Multiple Time Series Objects

Description

A row sum function for multiple time series object ("mts"), return the the summation of the "mts" object as a "ts" object

Usage

ts_sum(mts.obj)

Arguments

mts.obj

A multivariate time series object of a class "mts"

Examples

Run this code

x <- matrix(c(1:100, 1:100, 1:100), ncol = 3)
mts.obj <- ts(x, start = c(2000, 1), frequency = 12)
ts_total <- ts_sum(mts.obj)

Run the code above in your browser using DataLab