From p.dalgaard at biostat.ku.dk  Tue Aug 24 23:47:10 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Tue Aug 24 23:52:05 2004
Subject: [Rd] (PR#7199) function bug
In-Reply-To: <Pine.LNX.4.44.0408242108500.1119-100000@kleigh.nl>
References: <Pine.LNX.4.44.0408242108500.1119-100000@kleigh.nl>
Message-ID: <x2wtzotdi9.fsf@biostat.ku.dk>

Peter Kleiweg <kleiweg@let.rug.nl> writes:

> rpeng@jhsph.edu schreef:
> 
> > 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
> > `...'.
> 
> That is not very sensible behaviour, and it certainly doesn't
> explain why 2 is set equal to 3.

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!

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] (PR#7199) function bug
Peter Dalgaard