[Rd] Package development process?
hadley at rice.edu
Wed Jun 16 16:53:19 CEST 2010
> What about the encouragement to add unit tests, if only disguised as
Examples are not unit tests. Examples are a convenient way of testing
some aspects of the package, but serve a rather different purpose to
tests. The R community does not emphase testing nearly as much as
other communities. For example, Ruby has a very strong testing
culture including at least 10 different unit testing frameworks.
> I've found the unit tests to be a powerful tool to help improve and
> maintain the quality of packages to which I contribute. To this end, Sundar
> and I added a column "Autochecks" to the table of "Selected Repositories" in
> the Wikipedia article on "Software repository"
> (http://en.wikipedia.org/wiki/Software_repository), and we describe it
> briefly in the text introducing that table.
Unfortunately your description highlights a inadequacy of R and poor
software development procedures on the part of many R package
developers (including me!). For exactly the reason you discuss, it's
never a good idea for your package to depend on the most current
version of another package. If you do, changes to that package might
break yours. Most other package management systems allow you to
specify the version of a dependency so that this doesn't happen. You
can do this with R, but because it's hard to have multiple versions of
the same package installed at the same time, it's not as useful.
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
More information about the R-devel