changeTSrepresentation: Change the class of a (Multivariate) Time Series

View source: R/utils.R

changeTSrepresentationR Documentation

Change the class of a (Multivariate) Time Series

Description

Change the class of a (Multivariate) Time Series

Usage

    changeTSrepresentation (x, newRepresentation)

Arguments

x

a multivariate time series object.

newRepresentation

function or character string indicating the function to use to change the time series class.

Details

This function attempts to convert the time series to the new class using newRepresentation.

If the representation is a character string then it is applied using do.call(TSrepresentation, list(x, dates)) where x is the time series (matrix) to be return and dates are determined by as.Date(time(x)) where x is the default representation of the data. If representation is not a character string then it should be a function and is applied using TSrepresentation(x, dates)

Value

a multivariate time series object.


tframePlus documentation built on March 18, 2024, 3:01 p.m.