Skip to content

(PR#7199) function bug

3 messages · Roger D. Peng, Peter Kleiweg, Peter Dalgaard

#
This is a misunderstanding, I think, not a bug.  R is using partial 
matching and the `2', since it is not named, is being sent through the 
`...'.

-roger
morey@banta.psyc.missouri.edu wrote:
#
rpeng@jhsph.edu schreef:
That is not very sensible behaviour, and it certainly doesn't
explain why 2 is set equal to 3.
#
Peter Kleiweg <kleiweg@let.rug.nl> writes:
It isn't. The arguments are switched around. Like plot(1,x=0) plots a
point at (0,1), a fact that is sometimes used in connection with the
apply()-family of functions.

Given that we allow partial matching, this effect is pretty much
unavoidable. However, the partial matching is probably a feature
regretted by its designer for reasons of examples like this. Trying to
remove the feature from the language at this stage is going to be
pretty painful!