From h.wickham at gmail.com  Thu Jul  9 09:55:15 2009
From: h.wickham at gmail.com (hadley wickham)
Date: Thu, 9 Jul 2009 09:55:15 +0200
Subject: [Rd] "Roxygenating" packages
In-Reply-To: <d8ad40b50907080913m75640879o8295cca370b1f128@mail.gmail.com>
References: <d8ad40b50907080407y5bcc3a64r5c8a70271bc1dc3a@mail.gmail.com>
	<f8e6ff050907080753i27b806e5r84a62a26fe51f148@mail.gmail.com>
	<d8ad40b50907080913m75640879o8295cca370b1f128@mail.gmail.com>
Message-ID: <f8e6ff050907090055n52c2a95foedef31a9a45daa14@mail.gmail.com>

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
difficult.

Hadley

-- 
http://had.co.nz/



[Rd] "Roxygenating" packages
hadley wickham