dots: Capture a list of ... arguments as an object.

Description Usage Arguments Value Author(s) See Also Examples

Description

dots and methods of class ... provide a more convenient interface to capturing lists of unevaluated arguments and applying them to functions.

Usage

1

Arguments

...

Any number of arguments.

Value

A dots object. This is currently just the raw DOTSXP with the object bit set and the class set to "..." so that method dispatch works.

Author(s)

Peter Meilstrup

See Also

%<<% %<<<% %()% [.... [[.... names....

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
reverse.list <- function(...) {
 d <- dots(...)
 list %()% rev(d)
}
reverse.list("a", b="bee", c="see")

named.list <- function(...) {
 d <- dots(...)
 list %()% d[names(d) != ""]
 }
named.list(a=1, b=2*2, stop("this is not evaluated"))

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