ui <- fluidPage( sliderInput("n", "Number of observations", 2, 1000, 500), plotOutput("plot") ) server <- function(input, output) { autoInvalidate <- reactiveTimer(1000) output$plot <- renderPlot({ autoInvalidate() hist(rnorm(isolate(input$n))) }) } shinyApp(ui, server)