| Title: | Simple Dynamic Timer Control |
|---|---|
| Description: | A dynamic timer control is a Shiny widget that enables time-based processes in applications. It allows users to execute these processes manually in individual steps or at customizable speeds. The timer can be paused, resumed, or restarted. This control is particularly well-suited for simulations, animations, countdowns, or interactive visualizations. |
| Authors: | Sigbert Klinke [aut, cre] |
| Maintainer: | Sigbert Klinke <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-09 07:41:47 UTC |
| Source: | https://github.com/sigbertklinke/shinydtc |
Opens an example Shiny app into the RStudio editor.
openApp(dir = "mini", ...)openApp(dir = "mini", ...)
dir |
character: name of the app |
... |
further parameter given to |
invisibly the result of navigateToFile
if (interactive()) run() # runs the minimal exampleif (interactive()) run() # runs the minimal example
Simulates a button press for Reset.
resetTimer(inputId)resetTimer(inputId)
inputId |
character: input slot |
nothing
if (interactive()) vignette("shinyDTC")if (interactive()) vignette("shinyDTC")
Runs an example Shiny app via shiny::runExample().
runAppx(example = "mini", x = NULL, ...)runAppx(example = "mini", x = NULL, ...)
example |
character: name of the example to run, or NA to list the available examples |
x |
data frame: data to pass to the app |
... |
further parameter given to |
Note that for running a Shiny app more libraries might be necessary.
invisibly the (modified) data set x
if (interactive()) runAppx() # runs the minimal exampleif (interactive()) runAppx() # runs the minimal example
Simulates a button press on Step.
stepTimer(inputId)stepTimer(inputId)
inputId |
character: input slot |
nothing
if (interactive()) vignette("shinyDTC")if (interactive()) vignette("shinyDTC")
A reactive function.
timer(inputId, input, session, ...)timer(inputId, input, session, ...)
inputId |
character: input slot for a timer |
input |
an inpur object |
session |
a session object |
... |
further parameters for |
a reactive function which returns a counter
if (interactive()) vignette("shinyDTC")if (interactive()) vignette("shinyDTC")
Constructs a timer widget with a slider and two buttons.
timerInput(inputId, step1 = list(), reset = list(), ...)timerInput(inputId, step1 = list(), reset = list(), ...)
inputId |
character: input slot |
step1 |
list: list of parameters for the left (step) button |
reset |
list: list of parameters for the right (reset) button |
... |
parameters to the slider |
a widget to timer
if (interactive()) vignette("shinyDTC")if (interactive()) vignette("shinyDTC")
updateTimerInput
updateTimerInput( session = getDefaultReactiveDomain(), inputId, step1 = list(), reset = list(), ... )updateTimerInput( session = getDefaultReactiveDomain(), inputId, step1 = list(), reset = list(), ... )
session |
session object |
inputId |
id of the input object |
step1 |
modified values for |
reset |
modified values for |
... |
modified values for |
nothing
if (interactive()) vignette("shinyDTC")if (interactive()) vignette("shinyDTC")