Re: [Rd] checking for _non-existing_ documentation entries.

From: Jonathan Rougier <>
Date: Mon 20 Sep 2004 - 19:17:50 EST

Hi Mark, Hi Wolski,

I do this using noweb and a large-ish makefile. For a package I create a noweb subdirectory, stick the combined files in as "*.nw", and then use the Unix utility "make" with various targets to split these up into *.tex (etc), *.R, and *.Rd files, put into the right place; I also use make to install or build the updated package, so it all happens pretty seamlessly.

I'd be happy to send the makefile on if it would be helpful, although I'd be the first to admit that my understanding of make is not exactly state-of-the-art.

Cheers, Jonathan.

Mark Bravington wrote

>Wolski wrote:
>#I knew about prompt and promptMethods promptClass. They are
>#extremely useful if you are starting to write a package. But
>#what with existing packages that have to be rewritten?
>#Having code and documentation in one place would be a great
>#help. Has anyone a tool which is able to generate from
>#appropriately commented R-code files (e.g. <<example>>=
>#-example section) Rd files:

>#e.g. a noweb lit-prog file or patched version of Doxygen?
>Yes, there is such a tool-- or something close to it, anyway. My 'mvbutils' package lets you keep documentation in the same source "file" as the the function definition, appended at the end. Usually, when I am developing a function I start by writing informal documentation (which still displays with "?" but isn't an Rd file). Eventually I convert the documentation into a plain-text format close to the pager representation of R help files; this format can be converted into a .Rd file using my 'doc2Rd' function. Once I am close to having a whole package ready, I use the 'formalize.package' function to set up the a whole package; it creates the skeleton and the .R source file, and all the .Rd files via 'doc2Rd', ready for RCMD.
>For more details, have a look at README.mvbutils()
>Hope this helps
>Mark Bravington
>PO Box 1538
>Castray Esplanade
>TAS 7001
>phone (61) 3 6232 5118
>fax (61) 3 6232 5012
> mailing list

Jonathan Rougier                       Science Laboratories
Department of Mathematical Sciences    South Road
University of Durham                   Durham DH1 3LE
tel: +44 (0)191 334 3111, fax: +44 (0)191 334 3051

______________________________________________ mailing list
Received on Mon Sep 20 19:22:54 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:16 EST