[Rd] checking for _non-existing_ documentation entries.
Jonathan Rougier
J.C.Rougier at durham.ac.uk
Mon Sep 20 11:17:50 CEST 2004
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
>
>*******************************
>
>Mark Bravington
>CSIRO (CMIS)
>PO Box 1538
>Castray Esplanade
>Hobart
>TAS 7001
>
>phone (61) 3 6232 5118
>fax (61) 3 6232 5012
>Mark.Bravington at csiro.au
>
>______________________________________________
>R-devel at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
--
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
http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html
More information about the R-devel
mailing list