From hadley at rice.edu  Wed Apr 13 04:26:46 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Tue, 12 Apr 2011 21:26:46 -0500
Subject: [Rd] R CMD build --resave-data
In-Reply-To: <AD95DA9D-5887-4C59-AB6F-3AA400689306@r-project.org>
References: <4DA24F8A.7030405@fhcrc.org>
	<4DA31AA0.2050209@statistik.tu-dortmund.de>
	<4DA4F40C.7000409@fhcrc.org>
	<AD95DA9D-5887-4C59-AB6F-3AA400689306@r-project.org>
Message-ID: <BANLkTim00CqwGUbtaKN7j0As8Nchdb+ryw@mail.gmail.com>

>> If you deliberately ignore the fact that 'R CMD INSTALL' is also used
>> by developers to install from the *package source tree* (by opposition
>> to end users who use it to install from a *source tarball*,
>
> .. for a good reason, IMHO no serious developer would do that for obvious reasons - you'd be working on a dirty copy creating many unnecessary problems and polluting your sources. The first time you'll spend an hour chasing a non-existent problem due to stale binary objects in your tree you'll learn that lesson ;). The fraction of a second spent in R CMD build is well worth the hours saved. IMHO the only valid reason to run INSTALL on a (freshly unpacked tar ball) directory is to capture config.log.

This is news to me!  I know that you're supposed to run R CMD check on
the built package, but you're supposed to run install on it too?  (And
if it's so important, why doesn't R do it for you automatically?)

Do you have any convenient shortcuts to overcome the fact that the
binary package contains the package name?  i.e. how can I build and
install/check in a single line without having to specify the full file
name?

How can I go from:

R CMD build plyr && R CMD install plyr_1.5.tar.gz

to

R CMD build-and-install plyr ?

Hadley


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



[Rd] R CMD build --resave-data
Hadley Wickham