I have a shiny app with a ui.R and server.R file. The server.R file is of following format:
Loads data in
shinyServer(function(input, output, session) {
...
})
So I load the data in outside of the shinyServer function, and then can use that data within the app. There is one dataset which is large and takes a particularly long time to load in, but this dataset is only actually used when a particular filter within the app is turned on.
Is there a way to only load in this dataset when the filter is turned on, and then once the data has been read in it it is stored such that it doesn't read it in again if any of the filters are changed?
question from:
https://stackoverflow.com/questions/65937034/shiny-to-only-load-data-in-if-particular-filter-selected 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…