As discussed in Pre-Compute Results, Displayr can be sped up by pre-computing results. Where the pre-computed results are large and plentiful, this can slow down the Displayr document. A solution to this is to save pre-computed results in the Displayr Cloud Drive.
This example extends the example in Run Slow Data Queries, Calculations, and Extracts When Users Aren't Using a Document.
The code below extracts stock price data for Microsoft at 1AM New York time and then saves it to the Displayr Cloud Drive.
data <- new.env()
env = data,
from = seq(as.Date(Sys.Date()), length = 2, by = "-5 years"),
to = Sys.Date(),
auto.assign = TRUE))
all.data <- data[[ls(data)]]
stock.prices <- data.frame(all.data)
us.format = TRUE,
time.zone = "America/New_York",
units = "days",
frequency = 1,
options = "wakeup")
"Exporting data to cloud drive every day" # This is a comment so that the calculation is visible