Description Usage Arguments Details Examples
Turn 'RAVE' module auto-recalculate on or off
1 | auto_recalculate(on)
|
on |
logical or integer; see details |
Used inside of 'RAVE' modules. By default modules are automatically updated: that means if an input is updated, usually the module main function will be executed and outputs will be rendered. However, if main body function takes very long time to run, automatically recalculate module will result in freeze shiny session. To solve the issue, module writers can choose manually recalculate modules by turning off auto-recalculation.
on
can be logical or numerical. For logical values, either the
auto-recalculation is constantly on or off. For numerical, typically
integer values, on means temporary on for limited times. For example
auto_recalculate(1)
means run main function for one time.
To turn off auto-recalculation, call auto_recalculate
within
define_initialization
with on=FALSE
. To temporary
turn on recalculation, use shiny observeEvent
to capture an event and call auto_recalculate(1)
once event is
triggered.
1 2 3 4 5 6 7 8 9 | require(shiny)
# Turn on debug mode for example
rave_context('rave_module_debug')
# In initialization
define_initialization({
auto_recalculate(FALSE)
# ..., other initialization code
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.