From hadley at rice.edu  Wed Jun 16 16:53:19 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 16 Jun 2010 09:53:19 -0500
Subject: [Rd] Package development process?
In-Reply-To: <4C18E297.7020805@structuremonitoring.com>
References: <4C182C9E.2080604@structuremonitoring.com>
	<AANLkTinvljHoZC-XA5UgJkMoSmft9z9SjsUPwt_9W2F6@mail.gmail.com> 
	<4C18E297.7020805@structuremonitoring.com>
Message-ID: <AANLkTimtGcfzKshfvQsRBNGAqfxfiZkrabf0loOVtc1V@mail.gmail.com>

> ? ? ?What about the encouragement to add unit tests, if only disguised as
> examples?

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.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Package development process?
Hadley Wickham