-
Doc: a man page that explains how data are organized.
-
App: cell edition without requiring double-click first and enter at the end
-
App: either access to local files (IDE) or the mongodb server (RSConnect) and possibly use (https://solutions.posit.co/connections/db/r-packages/pool/)
-
App: use the {config} package to specify the way data is retrieved, depending if the Shiny application is run locally or on RSConnect, see https://solutions.posit.co/connections/db/best-practices/deployment/
-
App: using a database connection in Shiny, use onStop() event to disconnect or onSessionEnded() for a per session disconnection.
-
App: use a cache of the date for faster execution, but react to file changes using something like a reactivePoll, e.g.:
function(input, output, session) {
data <- reactivePoll(1000, session,
# This function returns the time that log_file was last modified
checkFunc = function() {
if (file.exists(log_file)) file.info(log_file)$mtime[1] else ""
},
# This function returns the content of log_file
valueFunc = function() { read.csv(log_file) }
)
output$dataTable <- renderTable({ data() })
}