Progress bars

It is quite common in Shiny applications, and in analytics generally, to have computations or data-fetches that take a long time. Sometimes, it will be necessary for the user to wait for some time before their output is returned. In cases such as this, it is a good practice to do two things: to inform the user that the server is processing the request and has not simply crashed or otherwise failed, and to give the user some idea of how much time has elapsed since they requested the output and how much time they have remaining to wait.

This is achieved very simply in Shiny using the withProgress() function. This function defaults to measuring progress on a scale from 0 to 1 and produces a loading bar at the top of the application ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.