From ripley at stats.ox.ac.uk  Fri May 18 11:54:56 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 18 May 2007 10:54:56 +0100 (BST)
Subject: [Rd] RFC: adding an 'exact' argument to [[
In-Reply-To: <464CBDB3.2060706@stats.uwo.ca>
References: <m2irarh1mu.fsf@ziti.fhcrc.org>
	<Pine.GSO.4.56.0705171150100.25965@durian.statsci.com>
	<m2fy5vfe3x.fsf@ziti.fhcrc.org>
	<Pine.LNX.4.64.0705172039480.10304@gannet.stats.ox.ac.uk>
	<464CBDB3.2060706@stats.uwo.ca>
Message-ID: <Pine.LNX.4.64.0705181051550.22924@gannet.stats.ox.ac.uk>

On Thu, 17 May 2007, Duncan Murdoch wrote:

> On 5/17/2007 3:54 PM, Prof Brian Ripley wrote:

>> There is a similar issue with argument partial matching.  Since we have the 
>> source of R one can pretty easily build a version of R which does not have 
>> the feature: I have been doing that in conjunction with 'codetools' to do 
>> some checking.
>> 
>> In both cases there is traditional partial matching: seq(along=) or 
>> seq(length=), and $fitted vs $fitted.values.  There are not many uses of 
>> seq(along.with=) about and vastly more of seq(along=) (although in R using 
>> seq_along() is preferable): even in some packages which do use 
>> seq(along.with=) there are more instances of seq(along=).
>
> Opinions, please:
>
> In another thread I think we have agreement to add an extra arg to the 
> vignette() function to limit it to attached packages.  By analogy with other 
> similar functions, the arg would be named all.available.  However, I suspect 
> most users would abbreviate that to just "all".
>
> Should I name it "all.available" for consistency, or "all" in anticipation of 
> a day when exact argument matching will be required?

I don't think it will be required.

However, the use of all.names etc is historical, from the days when S (and 
R) would warn if you used the name of a local non-function as a function, 
do an arg 'all' got in the way.   I would use the most intuitive form.

Shortly R-devel will have options to warn on partial matching in $ and in 
args.

-- 
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



[Rd] RFC: adding an 'exact' argument to [[
Prof Brian Ripley