delayed_assign(..., assign.env = parent.frame())delayed_assign_(..., .dots, assign.env = parent.frame())
This function creates one or more delayed assignments in a more natural
way compared to delayedAssign
.
The "dots" argument can be named or unnamed; for unnamed arguments, names
will be assigned by all_dots
. For each argument,
a delayed assignment with the specified name is created via
delayedAssign
. The delayed assignment will evaluate the
argument via lazy_eval
.
The function delayed_assign_
is a standard-evaluation version of the
above. See the "lazyeval" vignette for details.
## Not run: # # Creates a delayed assignment "fortytwo" which takes about 7.5 million # # years to compute: # delayed_assign(fortytwo = { Sys.sleep(7.5e6 * 365 * 24 * 60 * 60); 42 }) # ## End(Not run)