# NOT RUN {
# server.R
shinyServer(function(input, output, session) {
output$plot <- renderPlot({
withProgress(session, min=1, max=15, {
setProgress(message = 'Calculation in progress',
detail = 'This may take a while...')
for (i in 1:15) {
setProgress(value = i)
Sys.sleep(0.5)
}
})
plot(cars)
})
})
# }
Run the code above in your browser using DataLab