Re: [Rd] R CMD Rdconv drops sections: arguments, seealso, examples (PR#9649)

From: <>
Date: Tue, 01 May 2007 19:45:51 +0200 (CEST)

On Mon, 30 Apr 2007 wrote:

> On Tue, 10 Apr 2007 wrote:
> > I've created a .Rd file (below), then converted that to .sgml using
> > R CMD Rdconv --type=Ssgm combn.Rd > combn.sgml
> > The output (shown below) is missing some of the sections:
> > arguments
> > seealso
> > examples
> > If instead I convert to .d (below), the same sections are missing,
> > and the "note" section is included but without the necessary newline.
> The underlying problem was that there were some unmatched open-braces.
> (or 'brackets'?) The attached patch to share/perl/R/
> seems to detect unmatched open and close braces and throw an error:
> % R CMD INSTALL -l /tmp/Rlib timhPackage
> * Installing *source* package 'timhPackage' ...
> ** help
> >>> Building/Updating help pages for package 'timhPackage'
> Formats: text html latex example
> Rdconv(): mismatched braces in help file timh.Rd on or after line 12
> ERROR: building help failed for package 'timhPackage'
> ** Removing '/tmp/Rlib/timhPackage'
> ** Restoring previous '/tmp/Rlib/timhPackage'
> The code to report the line number doesn't work quite right
> since any "% comment" lines in the Rd file have been removed
> from $complete_text by the time we get here. I fudged by
> putting 'on or after line XXX' in the error message.

The following patch adds a little more information (the name of the \tag or whether it is an unmatched { or }) to the error message, so Tim's example results in

    % R CMD INSTALL -l /tmp/Rlib timhPackage

  sub unmark_brackets { mailing list Received on Tue 01 May 2007 - 17:48:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 May 2007 - 20:35:46 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.