From ripley at stats.ox.ac.uk  Fri Apr 25 06:37:18 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 25 Apr 2008 05:37:18 +0100 (BST)
Subject: [Rd] RFC: What should ?foo do?
In-Reply-To: <f8e6ff050804242123k76122d5cj94f0790cba4ca905@mail.gmail.com>
References: <48110D8B.10300@stats.uwo.ca> <48115131.7000402@comcast.net>
	<f8e6ff050804242123k76122d5cj94f0790cba4ca905@mail.gmail.com>
Message-ID: <alpine.LFD.1.10.0804250531540.30202@gannet.stats.ox.ac.uk>

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



[Rd] RFC: What should ?foo do?
Prof Brian Ripley