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. Thanks! Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA
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
> 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.Have a look at https://gist.github.com/d1bbd44894a99a2e1d1b for a start. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
Awesome! Thanks a lot! Regards, Yihui -- Yihui Xie <xieyihui at gmail.com> Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Thu, Nov 25, 2010 at 8:09 PM, Hadley Wickham <hadley at rice.edu> wrote:>> 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. > > Have a look at https://gist.github.com/d1bbd44894a99a2e1d1b for a start. > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ >
Seemingly Similar Threads
- New package Rd2roxygen: Convert Rd to roxygen documentation
- How to stop roxygen from creating Rd for functions that are not exported?
- Package Rd2roxygen v0.1-5
- Package Rd2roxygen v0.1-5
- R 2.13.0-beta for Windows, file.copy() throws suspicious errors due to default value of copy.mode