Bugzilla – Bug 15077
bquote() fails to set the default of a function of one argument
Last modified: 2012-10-23 16:05:43 UTC
##This is from the help for `bquote`:
bquote( function(x, y = .(default)) x+y )
# function(x, y = 1) x + y
##However this doesn't work when there is one argument to the function:
default <- 1
bquote( function(y = .(default)) y )
## expected result:
# function(y = 1) y
## actual result:
# function(y = .(default)) y
This should be fixed in bquote by simply moving the check for a pairlist before the length check.
Fixed in 2.15.2 patched
....meaning fixed in r-devel, scheduled for 2.5.2 patched, I suppose.
(2.5.2 is in code freeze and should only be unfrozen in case of truly severe problems.)
As I and the NEWS item said, for '2.15.2 patched'.