| av_add_data | R Documentation |
Adds price data to av_runShiny() internal data.
av_add_data(indta, assettypes = NULL, delay = 0)
indta |
A data.frame with the following minimal columns: |
assettypes |
(default NULL) An optional data.frame with minimal columns |
delay |
(default 0) Seconds to delay calls to determine asset type for future AV downloads. This is
unused if |
Entire set of columns from av_get_pf() can be added. First date column renamed to timestamp
Nothing
av_runShiny()
## Not run:
av_add_data(av_get_pf("IBM","TIME_SERIES_DAILY_ADJUSTED"))
asset_df <- data.frame(symbol=c("HYG"),type=c("ETF"),currency=c("USD"), name=c("HY ETF"))
av_add_data(av_get_pf("HYG","TIME_SERIES_DAILY_ADJUSTED"), assettypes=asset_df)
suppressMessages(require(quantmod))
ffdta <- as.data.table(quantmod::getSymbols("FEDFUNDS",src="FRED",auto.assign=FALSE))
ffdta <- ffdta[,.(DT_ENTRY=index,close=FEDFUNDS,adjusted_close=FEDFUNDS,symbol="FEDFUNDS")]
av_add_data(ffdta)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.