[R] Building static HTML help pages in R 2.10.x on Windows

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat Jan 2 17:38:31 CET 2010



Steve Rowley wrote:
>> Heinz Tuechler wrote:
>>> At 21:40 22.12.2009, Steve Rowley wrote:
>>>> (a) how to build the static HTML help pages of all currently
>>>>     installed packages under Windows, [...]
>> At least two ways:
>>
>> Way 1: reinstall all those packages from sources using
>>   R CMD INSTALL --html
>>
>> Way 2: go to the man directory of a source package and apply
>>   R CMD Rdconv --type="html" *.Rd
>> to all Rd files.
> 
> Ok, thanks.  That's starting along a helpful path.
> 
> The first way sounds dicey on Windows, since some of the packages require tools that I
> probably have installed (e.g., as part of Cygwin), but have never thought about how to
> hook together.
> 
> The second way sounds useful if I want to download the source for all the packages in
> addition to the binary installers that I already have.
> 
> Is there any way to do this from the Windows binary .zip files, or from the installations
> generated thereby?  After all, R generates the HTML on the fly somehow, so the information
> is present; IWBNI there were a way to use that to generate the static HTML.  (Looking
> through the installation dirs doesn't show very many .Rd files.)


Ah, sorry, I must have missed your reply.

WEell, internally, you can do somewthing as R's help system does, but it 
is documented to be subject to change ("As they are mainly intended for 
internal use, their interfaces are subject to change."), see ?Rd2HTML

For package pkg in directory c:/dir on help topic foo you could ask

Rd2HTML(tools:::fetchRdDB("c:/dir/pkg/help/pkg", "foo")) in order to get 
a HTML representation. See ?Rd2HTML for details on how to control stuff.

Uwe Ligges



More information about the R-help mailing list