with_progress | R Documentation |
Reports progress to the user during long-running operations.
with_progress(...) set_progress(...) inc_progress(...)
... |
see [shiny::withProgress] |
see [shiny::withProgress]
## 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) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.