[R] Go (back) from Rd to roxygen

Duncan Murdoch murdoch.duncan at gmail.com
Fri Nov 26 00:43:20 CET 2010


On 25/11/2010 3:45 PM, Yihui Xie wrote:
> Hi all,
>
> Since roxygen is a great help to document R packages, I am wondering
> if there exists an approach to go back from the raw Rd files to
> roxygen-documentation? E.g. turn "\author{Somebody}" into "@author
> Somebody". This sounds ridiculous, but I believe it helps in the long
> term for me to maintain R packages.

I have no idea, but it should be reasonably straightforward to write 
such a thing, since there's an Rd parser in the tools package.  Take a 
look at Rd2txt or one of the other converters that works on parsed Rd 
code, and write Rd2roxygen.

Duncan Murdoch



More information about the R-help mailing list