vadr (version 0.01)

dots_unpack: Show information about a ... object.

Description

This unpacks the contents of a ... object, returning the results in a data frame. In the R implementation, a ... object is a pairlist of promises, usually bound to the special name "..." and, when bound to that name, given special dispensation by the R interpreter when appearing in the argument list of a call. Dots objects are normally opaque to R code, and usually don't explicitly appear in user code, but you can obtain a ... inside of R by using get("...").

Usage

dots_unpack(...)
unpack(x)

Arguments

...
Any number of arguments. Usually, you will pass in the ... from the body of a function, e.g. dots_unpack(...). Technically this creates a copy of the dots list, but it should have identical effect.
x
A dots object.

Value

A data frame, with one row for each element of ..., and columns:
"name"
The name of each argument, or "" if present.
"envir"
The enviroment the promise came from.
"expr"
The expression attached to the promise. If the promise has been evaluated, this will be NULL.
"value"
The value attached to the promise. If the promise has not been evaluated, this will be NULL. (in reality is it usually the "missing value," but it would cause too much strangeness to return missing values from a function.

See Also

dots_names dots_missing dots_expressions dots