[Rd] "Roxygenating" packages
h.wickham at gmail.com
Thu Jul 9 09:55:15 CEST 2009
On Wed, Jul 8, 2009 at 6:13 PM, Barry
Rowlingson<b.rowlingson at lancaster.ac.uk> wrote:
> On Wed, Jul 8, 2009 at 3:53 PM, hadley wickham<h.wickham at gmail.com> wrote:
>> Sounds like a neat idea! Especially with Duncan Murdoch's recent work
>> making it easy to parse rdoc files in R.
> I reckon the tricky bit is going to be working out how to map the
> various possibilities of rdoc files into Roxygen syntax.
> We do have a huge potential test suite though, since once the .R
> files are passed through Roxygen we should get back the .Rd files that
> we started with....
> For example, just looking at the sp package, there's gridded.R which
> has functions documented in gridded-methods.Rd. Are Rd file names
> essentially arbitrary, meaning we need to look at the \alias section
> to see what functions are documented? And then if those functions are
> in more than one .R file what do we do?
Yes, the file names are arbitrary, so you need to inspect the alias
sections, and then output them to @alias rdoc tags. I'd think the
best way to start would be to convert each .rd file to a .r files
containing the rdoc comment block with tags, and then leave it up to
the user to match those comment blocks to individual functions.
Roxygen encourages more documentation of individual functions (rather
than a single rd file which documents many files), but teasing apart a
single rdoc file into multiple roxygen blocks would be exceedingly
More information about the R-devel