[Rd] how to extract directory with HTML version of help pages?

Prof Brian D Ripley ripley@stats.ox.ac.uk
Thu, 2 Nov 2000 19:58:06 +0000 (GMT)

On 2 Nov 2000, A.J. Rossini wrote:

> Is there a simple way to determine at run-time the directory with HTML
> version of help pages?

The short answer is `no', for the directory depends on the help page!

> (to see where I'm heading here, if you've got w3 installed under
> (X)Emacs on Unix _or_ a Microsoft OS, do 
>         w3-find-file 
> and load
>         $(R_HOME)/library/html/whateverfunction.html

But it's whateverlibrary/package/html/whateverfunction.html

You both overlooked the package part and the possibility of multiple
libraries. (To make sure we have the terminology straight, in R there
are libraries of packages, and in S libraries of sections (S3) or chapters
(S4).  I didn't invent this ....)

Since ESS apparently asks R for the text help page (or it does it just grab
the contents?), it could in principle do the same for the html help page.
That is, help could be asked when running under ESS to return the filename,
not send the file to the OS to be viewed (Windows) or call `browser -remote
"openURL(foo.html)' on it.

As far as I can see only the running R session can do this correctly, and
it tooks several goes to get it right (if we have).  What the right file is
depends on the history of the R session.

Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch