7

I used 'package.skeleton()' to generate .Rd help files a few months ago. I have edited these files, and I have also changed the functions, removed some functions, added others. Is there a function that automates updating the Rd files?

update

A nice package was just released called Rd2roxygen, it is described by the author Yihui Xie on his blog.

As the name implies, this package allows one to retroactively insert documentation currently contained in .Rd into .R files. Sounds like a promising approach for both learning roxygen and for converting packages currently in development to R packages. Woo hoo. Thanks Yihui!

Based on answers by Joshua and Yihui, the answer appears to be: roxygen allows automatic updating of Rd files etc based on changes in the source .R code, and if I am not using roxygen currently, Rd2roxygen can help me migrate.

David LeBauer
  • 31,011
  • 31
  • 115
  • 189

3 Answers3

11

Rd2roxygen was designed to help package developers who have been "stuck" in the raw Rd files but want to switch to roxygen -- it can process Rd files and update the R scripts with roxygen comments. From then on, you can begin to enjoy the power of roxygen. So Rd2roxygen is not a direct answer, but it might help you with the transition.

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
9

This doesn't specifically answer your question, but you may be interested in Roxygen.

Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
  • what are the advantages of roxygen over the tools described in "writing R extensions"? – David LeBauer Nov 04 '10 at 18:48
  • Mainly that it creates the .Rd files for you based on extra information you add to the source .R files. – Joshua Ulrich Nov 04 '10 at 19:01
  • 4
    @David A very important advantage is that it makes it easy to write the documentation immediately after you wrote the code---you don't even have to switch files. Then not only are the important details fresh in your head, but you can write the docs during the "woohoo! writing new code!" stage instead of the "ugh... have to go back and document it all" stage of production. – Sharpie Nov 04 '10 at 23:56
1

No, I don't think so.

But you could try re-running package.skeleton() for new or changed functions and then merge this by hand.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725