Learn R Programming

tframePlus (version 2024.2-1)

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

Description

Change the class of a (Multivariate) Time Series

Usage

changeTSrepresentation (x, newRepresentation)

Value

a multivariate time series object.

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)