Learn R Programming

quantmod (version 0.4.25)

getModelData: Update model's dataset

Description

Update currently specified or built model with most recent data.

Usage

getModelData(x, na.rm = TRUE)

Value

Returns object of class quantmod.OHLC

Arguments

x

An object of class quantmod

na.rm

Boolean. Remove NA values. Defaults to TRUE

Author

Jeffrey Ryan

Details

Primarily used within specify model calls, getModelData is used to retrieve the appropriate underlying variables, and apply model specified transformations automatically. It can be used to also update a current model in memory with the most recent data.

See Also

getSymbols load data specifyModel create model structure buildModel construct model modelData extract model dataset

Examples

Run this code
if (FALSE) {
my.model <- specifyModel(Next(OpCl(QQQQ)) ~ Lag(Cl(NDX),0:5))
getModelData(my.model)
}

Run the code above in your browser using DataLab