buildData | R Documentation |
Create one data object from multiple sources, applying transformations via standard R formula mechanism.
buildData(formula, na.rm = TRUE, return.class = "zoo")
formula |
an object of class |
na.rm |
drop rows with missing values? |
return.class |
one of "zoo","data.frame","ts","timeSeries" |
Makes available for use outside the quantmod workflow a dataset
of appropriately transformed variables, using the same mechanism
underlying specifyModel
. Offers the ability to apply transformations
to raw data using a common formula mechanism, without having to explicitly
merge different data objects.
Interally calls specifyModel
followed by modelData
, with the
returned object being coerced to the desired 'return.class' if possible,
otherwise returns a zoo
object.
See getSymbols
and specifyModel
for more information
regarding proper usage.
An object of class return.class
.
Jeffrey A. Ryan
getSymbols
, specifyModel
,
modelData
## Not run:
buildData(Next(OpCl(DIA)) ~ Lag(TBILL) + I(Lag(OpHi(DIA))^2))
buildData(Next(OpCl(DIA)) ~ Lag(TBILL), na.rm=FALSE)
buildData(Next(OpCl(DIA)) ~ Lag(TBILL), na.rm=FALSE, return.class="ts")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.