This package exposes two distinct programming APIs for working with
progress. withProgress()
and setProgress()
together provide a simple function-based interface, while the
Progress
reference class provides an object-oriented API.
Instantiating a Progress
object causes a progress panel to be
created, and it will be displayed the first time the set
method is called. Calling close
will cause the progress panel
to be removed.
As of version 0.14, the progress indicators use Shiny's new notification API.
If you want to use the old styling (for example, you may have used customized
CSS), you can use style="old"
each time you call
Progress$new()
. If you don't want to set the style each time
Progress$new
is called, you can instead call
shinyOptions(progress.style="old")
just once, inside the server
function.
Methods
initialize(session, min = 0, max = 1)
Creates a new progress panel (but does not display it).
set(value = NULL, message = NULL, detail = NULL)
Updates the progress panel. When called the first time, the
progress panel is displayed.
inc(amount = 0.1, message = NULL, detail = NULL)
Like set
, this updates the progress panel. The difference is
that inc
increases the progress bar by amount
, instead
of setting it to a specific value.
close()
Removes the progress panel. Future calls to set
and
close
will be ignored.