dots_unpack: Show information about a ... object.

Description Usage Arguments Value Note Author(s) See Also

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

1
2
3

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.

Note

There are some problems with R printing data frames containing lists of language objects (and more problems when working with "missing value" objects.) Therefore this sets the class on the columns to one that has a special as.character method.

Author(s)

Peter Meilstrup

See Also

dots_names dots_missing dots_expressions dots


crowding/vadr documentation built on May 14, 2019, 11:33 a.m.