[R] Sd2Rd Hangup
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jun 26 17:26:47 CEST 2001
On Tue, 26 Jun 2001, Bartz, Kevin wrote:
> I've been converting a number of .sgml S-documentation filed to .Rd format
> and a few persistent complications--all involving the documentation's
> examples--have arisen every time I issue the standard R CMD check to prepare
> my project for building. The impression I get is that the check script
> simply tries to execute every R command in the included documentation's
> example{ } sections. But since Sd2Rd essentially dumps an S-documentation
> file's example contents into the new .Rd file, formatting problems crop up.
> Correct me if I'm wrong, but Sd2Rd neither strips each example line's
> opening greater-than (">") nor prunes the output. And then check barks at me
Right. There are no conventions for example sections in S's .d or .sgml
files.
> when R can't execute either of the ">"-padded example code or the actual
> output, which I didn't even intend for it to try to interpret in the first
> place. In the meantime, I've been using a Perl script that sifts through a
> set of .Rd's and makes the proper connections, stripping all ">"s and
> sticking "\dontrun"s around the output, but I was wondering if there's a
> better or built-in way. Any advice?
If that works for you, that's the best I know of. Most authors of S help
files do not include the > nor the output, so I see few problems in the
literally hundreds of such files I have ported. When I do, I have to hand
edit, and for example the VR conversion scripts contain a set of patch
files to convert my co-author's conventions to R's.
But I am glad to know that someone is benefiting from the work I put in
writing the .sgml->.Rd converter.
--
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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list