Learn R Programming

rewind (version 0.3.0)

rewind_history: Inspect the history

Description

rewind_history() gives one row for each entry that rewind keeps. rewind_can_undo() and rewind_can_redo() tell you if the position can change. All three functions depend on the history. You can thus use them in render*() and observe() to control your own UI.

Usage

rewind_history(session = shiny::getDefaultReactiveDomain())

rewind_can_undo(session = shiny::getDefaultReactiveDomain())

rewind_can_redo(session = shiny::getDefaultReactiveDomain())

Value

rewind_history() gives a data frame. It has the columns index, label, time and current. The other two functions give one logical value.

Arguments

session

The Shiny session. The default is the current session.

Examples

Run this code
if (interactive()) {
  library(shiny)

  server <- function(input, output, session) {
    rewind_enable()
    output$steps <- renderTable(rewind_history())
  }
}

Run the code above in your browser using DataLab