pkg_ref objects are environments and can be passed to with
in much the same way. This specialized function makes sure that any fields
within the pkg_ref have been appropriately evaluated before trying
to execute the expression.
# S3 method for pkg_ref
with(data, expr, ...)the value of the evaluated expr.
data to use for constructing an environment. For the
default with method this may be an environment, a list, a
data frame, or an integer as in sys.call. For within,
it can be a list or a data frame.
expression to evaluate; particularly for within()
often a “compound” expression, i.e., of the form
{
a <- somefun()
b <- otherfun()
.....
rm(unused1, temp)
}
arguments to be passed to (future) methods.