powered by
ic()
These functions let you evaluate an expression with either ic() enabled or disabled without affecting if ic() is enabled globally.
with_ic_enable(expr)with_ic_disable(expr)
with_ic_disable(expr)
Returns the result of evaluating the expression.
An expression containing the ic() function.
with_ic_enable(): evaluates the expression with ic() enabled.
with_ic_enable()
with_ic_disable(): evaluates the expression with ic() disabled.
with_ic_disable()
ic_enable() fun <- function(x) { ic(x * 100) } fun(2) with_ic_disable(fun(2)) fun(4) ic_disable() fun(1) with_ic_enable(fun(1))
Run the code above in your browser using DataLab