Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
211 views
in Technique[技术] by (71.8m points)

r - Shiny to only load data in if particular filter selected

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...