if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
useThreeDots(),
actionButton("render", "Render"),
threeDots(plotOutput("plot"))
),
server = function(input, output) {
output$plot <- renderPlot({
input$render
Sys.sleep(3)
hist(mtcars$mpg)
})
}
)
}
Run the code above in your browser using DataLab