Description Usage Arguments Examples
This function implement a mechanism to postpone actions,
which can be executed at a later stage. This is useful
when developing packages, where actions that need to be
run in the link{.onLoad}
function but can be
defined close to their context.
1 2 3 4 5 6 |
expr |
expression that define the action to postpone. Currently only functions are supported. |
key |
identifier for this specific action. It should be unique across the postponed actions from the same group. |
group |
optional parent action group. This enables to define meaningful sets of actions that can be run all at once. |
envir |
environment in which the action should be executed. Currently not used. |
verbose |
logical that toggles verbose messages. |
1 2 3 4 5 6 7 8 9 10 11 12 | opt <- options(verbose=2)
# define actions
postponeAction(function(){print(10)}, "print")
postponeAction(function(){print(1:10)}, "more")
postponeAction()
# execute actions
runPostponedAction()
runPostponedAction()
# restore options
options(opt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.