extract_dots: Extract the ellipsis inside a function

Description Usage Value Examples

View source: R/extract_dots.R

Description

Allow the named entries in ... to be used easily within a function by attaching them to the function's environment

Usage

1

Value

No return value, called for it's side effect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
f <- function(...) {
  a + b
}

## Not run: 
# Throws an error because a and b are trapped inside `...`
 f(a = 1, b = 2)

## End(Not run)

f <- function(...) {
  extract_dots()
  a + b
}
f(a = 1, b = 2)

rando documentation built on Feb. 16, 2021, 5:07 p.m.