Skip to content

Converting R help files to S-Plus 6 sgml,html

2 messages · Frank E Harrell Jr, Brian Ripley

#
I have help files in several formats.  Up until now I have converted nroff files to S-Plus 6 sgml and html files using 

 Splus doc_to_S ... (creates .sgml file)
 Splus HINSTALL ... (creates .sgm and .html files)

I maintain master help files in R .Rd files, and for some of my functions converting from .Rd to .sgm using R CMD Rdconv --type=Ssgm ... produces better .sgm files than beginning with the nroff files, as doc_to_s or HINSTALL can mess up help files with USAGE components showing more than one function invocation.  I think I can put the output of R CMD Rdconv directly into e.g. /usr/local/splus/library/foo/.Data/__Shelp/*.sgm.  But then I don't know how to create the html entry in /usr/local/splus/library/foo/.Data/__Hhelp/*.html.  Any help or corrections to my approach would be most appreciated.

Frank
#
On Tue, 3 Dec 2002, Frank E Harrell Jr wrote:

            
functions converting from .Rd to .sgm using R CMD Rdconv --type=Ssgm ...
produces better .sgm files than beginning with the nroff files,
as doc_to_s or HINSTALL can mess up help files with USAGE components
showing more than one function invocation.  I think I can put the output
of R CMD Rdconv directly into e.g.
/usr/local/splus/library/foo/.Data/__Shelp/*.sgm.  But then I don't
know how to create the html entry in
/usr/local/splus/library/foo/.Data/__Hhelp/*.html.
Any help or corrections to my approach would be most appreciated.

Which version of S-PLUS?  For 6.x you should be producing .sgml files.
If you do that,  Splus CHAPTER; Splus MAKE will install them for you
and do all the post-processing.  If not,

Splus make HELPSGML=*.sgml install.help

will do the trick.

Note

(i) the files must be .sgml
(ii) they must be in the top-level directory of the chapter.

I have given up trying to maintain common masters for R/S: I now keep
.Rd and .sgml separately.  Although the .Rd->.sgml conversion works
better than .d->.sgml, the possible markup in .Rd and .sgml is not
the same.

Brian