From ripley at stats.ox.ac.uk  Thu Nov 15 10:13:26 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 15 Nov 2007 09:13:26 +0000 (GMT)
Subject: [Rd] library path in Rd link
In-Reply-To: <Pine.LNX.4.64.0711150658040.11152@gannet.stats.ox.ac.uk>
References: <200711141549.54176.dusa.adrian@gmail.com>
	<200711150109.02826.dusa.adrian@gmail.com>
	<Pine.LNX.4.64.0711142309470.1433@gannet.stats.ox.ac.uk>
	<200711150144.33561.dusa.adrian@gmail.com>
	<Pine.LNX.4.64.0711150658040.11152@gannet.stats.ox.ac.uk>
Message-ID: <Pine.LNX.4.64.0711150905060.25358@gannet.stats.ox.ac.uk>

On Thu, 15 Nov 2007, Prof Brian Ripley wrote:

> On Thu, 15 Nov 2007, Adrian Dusa wrote:
>
>> On Thursday 15 November 2007, Prof Brian Ripley wrote:
>>> [...]
>>>>
>>>> Using as above:
>>>> \code{\link{anova}}
>>>>
>>>> the html help file directs to
>>>> file:///home/adi/myRlibrary/stats/html/anova.html
>>>
>>> I hope it is actually ../../stats/html/anova.html and the browser is
>>> interpreting that as a full URL.
>>>
>>>> instead of
>>>> file:///usr/lib/R/library/stats/html/anova.html
>>>
>>> But at run time help.start() creates links into a subdirectory of
>>> tempdir().  As in
>>>
>>>> help.start()
>>
>> I got it.
>> Perhaps it would be useful to have another startup option, something like:
>> options(htmlLinksResolve=TRUE)
>>
>> that one could use in the .First() function from .Rprofile
>
> You could have a function to run there, essentially (from help.start())
>
>     .Script("sh", "help-links.sh",
>             paste(tempdir(), paste(.libPaths(), collapse = " ")))
>
> and perhaps (it is a lot slower)
>
>     utils::make.packages.html()

It transpires that currently you do need both: although the script is 
passed the library locations it does not make use of them, leaving the 
linking to make.packages.html.  (That used not to be the case.)

> The problem is that even the first can be slow on a network-mounted file
> system with a lot of packages installed, do we don't want to do it by
> default.

So speed is the problem: I am seeing about 4 secs on a system with 1450 
packages on the local disc, and 33 secs on a slower system with a 
network-mounted FS.

-- 
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] library path in Rd link
Prof Brian Ripley