progress: Progress

with_progressR Documentation

Progress

Description

Reports progress to the user during long-running operations.

Usage

with_progress(...)

set_progress(...)

inc_progress(...)

Arguments

...

see [shiny::withProgress]

Value

see [shiny::withProgress]

Examples

## Only run examples in interactive R sessions
if (interactive()) {
   options(device.ask.default = FALSE)
   ui <- fluidPage(plotOutput("plot"))
   #
   server <- function(input, output) {
     output$plot <- renderPlot({
       with_progress(message = 'Calculation in progress',
                     detail = 'This may take a while...', value = 0, {
                     for (i in 1:15) {
                       inc_progress(1/15)
                       Sys.sleep(0.25)
                     }
                   })
       plot(cars)
   })
 }
 #
 shinyApp(ui, server)
}

sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.