Bug 15199 - Default values not applied to ... arguments
Summary: Default values not applied to ... arguments
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 2.15.2 patched
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2013-02-09 15:53 UTC by Duncan Murdoch
Modified: 2013-02-10 00:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Murdoch 2013-02-09 15:53:20 UTC
In this example, the default for b is lost:

f <- function(...) { g(...) }

g <- function(a=4,b=5,c=6) { 
  print(c(missing(a), missing(b), missing(c)))
  b 
}

f(1,,3) 
# [1] FALSE  TRUE FALSE
# Error in g(...) : argument is missing, with no default

We see that missingness is passed down correctly, but the assignment of defaults doesn't happen.