[R] Difficulty with R CMD INSTALL

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Jun 4 08:23:18 CEST 2001

On Sun, 3 Jun 2001 fharrell at virginia.edu wrote:

> I am running Linux Mandrake 7.2 with the following:
> platform i586-pc-linux-gnu
> arch     i586
> os       linux-gnu
> system   i586, linux-gnu
> status
> major    1
> minor    2.3
> year     2001
> month    04
> day      26
> language R
> To build a package I ran R CMD build Hmisc, apparently with success:
> * checking for file `Hmisc/DESCRIPTION' ... OK
> * preparing `Hmisc':
> * cleaning src
> * checking whether `INDEX' is up-to-date ... NO
> * use `--force' to overwrite the existing `INDEX'
> * removing junk files
> * building `Hmisc_1.0.tar.gz'
> The source directory had a single large R source file under R

With what extension?

At that point in the install process we have

    if test -d R; then
      echo " R"
      mkdir -p ${lib}/${pkg}/R
      cat `ls R/*.[RSqrs] R/unix/*.[RSqrs] 2>/dev/null` \
        > ${lib}/${pkg}/R/${pkg}

This will get stuck if there is an R directory, but the files in it
do not have extensions R S q r or s.  See section 1.1.3 of `Writing R
extensions' for the rules.

That's a bug (getting stuck) fixed in R-devel and hence will be fixed in
1.3.0: from the CVS logs

revision 1.61
date: 2001/05/03 07:18:41;  author: ripley;  state: Exp;  lines: +6 -4
INSTALL failed if dir R was empty or had no suitable files

As a more general comment, R CMD build is intended to be the last stage of
the process, used after R CMD check (which checks that installation works).
When developing a package I tend to INSTALL it several times and run a few
tests each time, then use R CMD check --no-clean to refine it (not
re-installing from scratch each time), and finally R CMD check then R CMD


Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list