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
When the withProgress is closed, the program still runs in the background. I don't know if it's a bug, if not can add this feature? this is a example in 《Mastering Shiny》.
library(shiny)
ui <- fluidPage(
numericInput("steps", "How many steps?", 10),
actionButton("go", "go"),
textOutput("result")
)
server <- function(input, output, session) {
data <- eventReactive(input$go, {
withProgress(message = "Computing random number", {
for (i in seq_len(input$steps)) {
Sys.sleep(0.5)
incProgress(1 / input$steps)
}
runif(1)
})
})
output$result <- renderText(round(data(), 2))
}
shinyApp(ui, server)
Thanks!
The text was updated successfully, but these errors were encountered:
I'm not sure I understand what you're referring to here. The example appears to work as expected for me. Could you please be more precise about what you're observing and how you expect it to be different?
When the withProgress is closed, the program still runs in the background. I don't know if it's a bug, if not can add this feature? this is a example in 《Mastering Shiny》.
Thanks!
The text was updated successfully, but these errors were encountered: