[Rd] RFC: What should ?foo do?

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Apr 25 06:37:18 CEST 2008


On Thu, 24 Apr 2008, hadley wickham wrote:

>>  I am not convinced that ?foo should do this however. help("foo")
>>  conceptually seems predicated upon the notion that a user is looking for
>>  a reference/help page for a specific function or descriptor called
>>  'foo'. The user knows the name of the function or descriptor and should
>>  not have to wait for a search function to locate it or conceptually
>
> Is that true?  That does limit the usefulness of ? as it implies that
> you must already know the function that you need.
>
>>  related terms. If the user has a large number of CRAN packages
>>  installed, such a search can take a rather long time. That's an issue
>>  for example with help.search().
>
> But that's just a problem with the current implementation.  Better
> indexing could make full text search of all documentation practical
> instantaneous.  This is one argument for a centralised documentation
> web site - such indices are much easier to set up in a modern web
> development environment.  I could imagine this being an eventual
> feature of crantastic.org, but it requires on some tool to turn Rd
> files into a form more easily parsed with off-the-shelf tools (ideally
> xml).

The search is a lot faster in 2.7.x, but is limited by disc speed (and 
hence is relatively slow on Windows -- and I have a box which has both 
Linux and Windows on, so I've tested this on identical hardware). R is a 
dynamic environment which can change libraries (and their order), add or 
remove packages ....  The text search is pretty close to instantaneous 
(try it a second time) -- the time is taken building the database for the 
first use.

Yes, we could do this differently, but some credit for the work already 
done would be an encouragement to continue to improve.


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



More information about the R-devel mailing list