From jfox at mcmaster.ca  Sun Feb  3 16:04:19 2008
From: jfox at mcmaster.ca (John Fox)
Date: Sun, 3 Feb 2008 10:04:19 -0500
Subject: [Rd] argument order for Math2 group functions in R
	2.6.x	(PR#10683)
In-Reply-To: <20080202174519.3769E283416B@mail.pubhealth.ku.dk>
References: <20080202174519.3769E283416B@mail.pubhealth.ku.dk>
Message-ID: <003301c86676$0d1b82e0$275288a0$@ca>

Dear Brian,

Are there many primitives that take more than one argument? I see, for
example, that round() is another. Might it not be a good idea to provide a
warning in the help file(s) that arguments must be supplied in the correct
order?

Regards,
 John


> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-
> project.org] On Behalf Of ripley at stats.ox.ac.uk
> Sent: February-02-08 12:45 PM
> To: r-devel at stat.math.ethz.ch
> Cc: R-bugs at biostat.ku.dk
> Subject: Re: [Rd] argument order for Math2 group functions in R 2.6.x
> (PR#10683)
> 
> signif() is primitive in 2.6.x, and so uses positional matching (almost
> all primitives do).
> 
> See the NEWS file for the announcement of the change.
> 
> 
> On Sat, 2 Feb 2008, ben.hansen at umich.edu wrote:
> 
> > Full_Name: Ben Hansen
> > Version: 2.6.1
> > OS: Windows
> > Submission from: (NULL) (66.93.3.101)
> >
> >
> > Hi,
> >
> > In R 2.6.0 or 2.6.1 on Windows, I get the following upon opening the
> GUI (no
> > previous commands or special settings):
> >> signif(digits=4, x=1/3)
> > [1] 4
> >
> > It seems to be taking 4 to be the "x" argument, the number to be
> rounded.
> > However, my understanding (perhaps mistaken) was that it should
> respond as
> > follows:
> >> signif(digits=4, x=1/3)
> > [1] 0.3333
> >
> > (This last is what I get from R 2.5.0 running on the same machine,
> and what I'm
> > used to getting using earlier versions.)  Similar things happen with
> round().
> >
> > I haven't yet had the opportunity to investigate whether I'd see the
> same
> > behavior on other platforms.
> >
> > Best wishes,
> > Ben
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> 
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] argument order for Math2 group functions in R 2.6.x (PR#10683)
John Fox