[R] updating contents of a package

hadley wickham h.wickham at gmail.com
Sun Feb 8 15:34:51 CET 2009

On Sun, Feb 8, 2009 at 4:26 AM, Dieter Menne
<dieter.menne at menne-biomed.de> wrote:
> Markus Loecher <markus.loecher <at> gmail.com> writes:
>> I read through the "Writing R Extensions" document and am able to now create
>> my own packages/libraries which so far are just well documented collections
>> of my own R functions. I use package.skeleton() and the tools package to
>> build these packages.
>> However, it is not clear to me how to modify and update a package after its
>> initial creation. How do you elegantly update e.g. the old help file when
>> one added an argument to a function ? How do you keep most of the existing
>> package structure when implementing incremental changes ?
> In detail, Tobias is right. In summary: incremental changes must be made
> by manual updating the files. When I did it the first time, I had no
> latex background and it reminded me of r(un)off times. After you did
> it once, it's not that complex though, so bite the bullet.

Also check out the roxygen package, which allows you to build the
documentation from comments in your source files.  This makes
documentation much easier to keep up-to-date, as it's right next to
the code that you're changing.  It also takes care of some of the
tediousness of Rdoc by copying across the usage etc directly from the
function definition.


More information about the R-help mailing list