Re: [Rd] (PR#7199) function bug

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 25 Aug 2004 - 07:47:10 EST

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

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Aug 25 07:58:41 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:09 EST