
Delay the evaluation of an expression until the end of a function or block.
Source:R/delay.R
delay.RdDelay the evaluation of an expression until the end of a function or block.
Usage
delay(expr, envir = parent.frame(), add = TRUE, after = FALSE)Arguments
- expr
An expression to be evaluated later.
- envir
The environment in which to evaluate the expression.
- add
if TRUE, add
exprto be executed after any previously set expressions (or before ifafteris FALSE); otherwise (the default)exprwill overwrite any previously set expressions.- after
if
addis TRUE andafteris FALSE, thenexprwill be added on top of the expressions that were already registered. The resulting last in first out order is useful for freeing or closing resources in reverse order.