stepTimer | R Documentation |
Simulates a button press on Step
.
stepTimer(inputId)
inputId |
character: input slot |
nothing
# Example requires the use of a `shiny` app (See Vignette)
if (interactive()) {
library(shiny)
library(shinyDTC)
library(shinyjs)
ui <- fluidPage(
useShinyjs(),
timerUI("ttimer"),
actionButton("step", "Trigger Step (Externally)")
)
server <- function(input, output, session) {
timerServer("ttimer")
observeEvent(input$step, {
stepTimer("ttimer")
})
}
shinyApp(ui, server)
}
## Not run:
# stepTimer("ttimer") should be used inside a `shiny` server context
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.