You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display console messages in a modal while downloading/loading a data set.
The idea is to give users an idea of what is going on in the R session, especially when data sets are being downloaded for the first time, as this can take some time, during which users may think that the app has frozen.
A progress bar was added in #4 but it is unable to report whether a data set is being downloaded or loaded from cache, as this is all handled within a single call to the ExperimentHub.
Attempt 1
I've used capture.output(..., type = 'message', file = NULL), stored the result to rObjects and used verbatimTextOutput() to display it in a modal. However, file=NULL does not return anything until the command has completed, which is useless in terms of interactivity.
In future attempts, try using file=tempfile(), and invalidateLater() to regularly check whether the file is being updated. If so, the contents of the file could be displayed in the modal as the file is being written/updated.
The text was updated successfully, but these errors were encountered:
kevinrue
changed the title
[FEATURE] Your bug or feature request
[FEATURE] display console messages in shiny app
Aug 4, 2022
See branch kra-capture-output for an implementation that progressively captures console output to a file.
However, the single-threaded nature of R and the priority of reactive events in Shiny also results in the app displaying the final contents of the file after the download has completed.
Display console messages in a modal while downloading/loading a data set.
The idea is to give users an idea of what is going on in the R session, especially when data sets are being downloaded for the first time, as this can take some time, during which users may think that the app has frozen.
A progress bar was added in #4 but it is unable to report whether a data set is being downloaded or loaded from cache, as this is all handled within a single call to the
ExperimentHub
.Attempt 1
I've used
capture.output(..., type = 'message', file = NULL)
, stored the result torObjects
and usedverbatimTextOutput()
to display it in a modal. However,file=NULL
does not return anything until the command has completed, which is useless in terms of interactivity.In future attempts, try using
file=tempfile()
, andinvalidateLater()
to regularly check whether the file is being updated. If so, the contents of the file could be displayed in the modal as the file is being written/updated.The text was updated successfully, but these errors were encountered: