-
Notifications
You must be signed in to change notification settings - Fork 13
Timer in RCAP
Paulin Shek edited this page Aug 4, 2016
·
2 revisions
The timer control uses a dummy variable to trigger changes. This advantage is that this means that one timer control can be used to fire multiple functions, as long as they all mention the associated dummy variable.
Consider a timer control with associated variable dummyVariable
and interval of 1, and also a rtext control with control function timerTrigger
with the following code:
dummyVariable <<- 0 # can be any value, it doesn't matter
timerTrigger <<- function() {
paste(rnorm(10), collapse = " ")
}
Then when the dashboard is displayed, the 10 random numbers will be regenerated every second.
RCAP - RCloud powered dashboards and websites