# In server.R
output$distPlot <- renderPlot({
  # Take a dependency on input$goButton
  input$goButton
  # Use isolate() to avoid dependency on input$obs
  dist <- isolate(rnorm(input$obs))
  hist(dist)
})
# In ui.R
actionButton("goButton", "Go!")Run the code above in your browser using DataLab