if (interactive()) {
library(shiny)
ui <- fluidPage(
rewind_buttons(),
selectInput("region", "Region", c("North", "South", "East")),
sliderInput("year", "Years", 2018, 2026, c(2018, 2026), sep = ""),
tableOutput("changed")
)
server <- function(input, output, session) {
rewind_enable()
# What did the last step change?
output$changed <- renderTable({
rewind_diff()[, c("name", "change")]
})
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab