From ripley at stats.ox.ac.uk  Tue May 27 09:00:29 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 27 May 2008 08:00:29 +0100 (BST)
Subject: [Rd] make.packages.html
In-Reply-To: <20080526232318.GA29362@psych.upenn.edu>
References: <20080526232318.GA29362@psych.upenn.edu>
Message-ID: <alpine.LFD.1.10.0805270732050.8793@gannet.stats.ox.ac.uk>

On Mon, 26 May 2008, Jonathan Baron wrote:

> It used to be that, whenever I added or updated a new package, the
> file /usr/lib/R/doc/html/packages.html would be updated (on Linux).
> Now I find that this does not happen anymore.

It does happen, but only if you install a package to the .Library 
directory.  That file is only intended as a listing of the main library, 
not other libraries (as which are in the library path is 
session-specific).  As NEWS for R 2.6.0 says

     o	install.packages() on a Unix-alike now updates
 	doc/html/packages.html only if packages are installed to
 	.Library (by that exact name).

> So I found this function make.packages.html, which seems to do what I 
> think should be done automatically.  But it puts its output in a file in 
> /tmp/...,

It is a helper for help.start(), which sets up details of the current 
packages in the session temporary directory.  Please do consult its help 
file.

The function used to update doc/html/packages.html is 
utils:::link.html.help(), which is a wrapper for 
tools:::unix.packages.html.

> which I then have to move, in an extra step, to where it should be.  I
> don't understand why this happens.  I think that the old behavior was
> better.

It caused a lot of needless updating.

> I have two reasons for this.  First, my R page (finzi.psych.upenn.edu)
> has a list of all packages.  As it happens, since this change has
> occurred, it has been out of date, until today.  Second, for my own
> use, I have a Firefox bookmark to
> file:/usr/lib/R/doc/html/packages.html, which was also out of date.

Let's hope you have a vaiid file:// URL ....

> I don't subscribe to r-devel, so, in case this gets posted, please use
> group reply.

What we don't know is where you are installing your packages.  If it is to 
the main library, the behaviour should be unchanged (and I have just 
tested it and it works for me).  If it is to another library, the 
intention never was to list packages in other libraries.

[Note that all this applies to Unix-alikes: Windows does not have symbolic 
links (OK, some filesystems on some versions have a very limited form) and 
R does things differently there.]

>
> Jon
> -- 
> Jonathan Baron, Professor of Psychology, University of Pennsylvania
> Home page: http://www.sas.upenn.edu/~baron

-- 
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] make.packages.html
Prof Brian Ripley