0

Naively, I thought that R's ... notation would collect all named arguments that appear after it so that they can be passed along. For example:

> a <- function(..., arg=TRUE) b(...)
> b <- function(arg=TRUE) print(arg)
> a(arg=FALSE)
[1] TRUE # I would want this to be FALSE

Since this clearly doesn't happen, is there some way to package up all of the arguments supplied to a function so that they get sent along?

rhombidodecahedron
  • 7,235
  • 10
  • 55
  • 88

1 Answers1

1

You will need to pass arg:

a <- function(..., arg=TRUE) b(..., arg = arg)
G. Grothendieck
  • 233,926
  • 16
  • 195
  • 321