Ellipsis expansion in nested functions: Error "'...' used in an incorrect context"

Viewed 9871

I have a very simple piece of code that produces:

afun <- function(a) {
  return(bfun(...))
}
bfun <- function(...) {
  return(a + 1)
}

> afun(1)
Error in afun(1) : '...' used in an incorrect context

But what R doesn't like here?

2 Answers
Related