From marco.scutari at gmail.com  Tue Jun  2 13:12:32 2009
From: marco.scutari at gmail.com (Marco Scutari)
Date: Tue, 2 Jun 2009 13:12:32 +0200
Subject: [Rd] cryptic error message from R CMD check
Message-ID: <b7d7c3160906020412t28e4efe5rf7e871703d8d6421@mail.gmail.com>

Dear R developers,

I've run into a very cryptic error message from R CMD check
while working on a new package. This is the relevant output:

[fizban@~/Rmap]:R CMD check Rmap
* checking for working pdflatex ... OK
* using log directory '/home/fizban/Rmap/Rmap.Rcheck'
* using R version 2.9.0 (2009-04-17)
* using session charset: UTF-8
* checking for file 'Rmap/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'Rmap' version '0.1'
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for .dll and .exe files ... OK
* checking whether package 'Rmap' can be installed ... ERROR
Installation failed.
See '/home/fizban/Rmap/Rmap.Rcheck/00install.out' for details.
[fizban@~/Rmap]:cat /home/fizban/Rmap/Rmap.Rcheck/00install.out
* Installing *source* package ?Rmap? ...
** R
** preparing package for lazy loading
** help
*** installing help indices
Error in `[.data.frame`(M, , 4) : undefined columns selected
* Removing ?/home/fizban/Rmap/Rmap.Rcheck/Rmap?

R CMD build + INSTALL fails in the same way:

[fizban@~/Rmap]:R CMD build Rmap
* checking for file 'Rmap/DESCRIPTION' ... OK
* preparing 'Rmap':
* checking DESCRIPTION meta-information ... OK
* removing junk files
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
WARNING: directory 'Rmap/man' is empty
* building 'Rmap_0.1.tar.gz'
[fizban@~/Rmap]:sudo R CMD INSTALL Rmap_0.1.tar.gz
* Installing to library ?/usr/local/lib/R/site-library?
* Installing *source* package ?Rmap? ...
** R
** preparing package for lazy loading
** help
*** installing help indices
Error in `[.data.frame`(M, , 4) : undefined columns selected
* Removing ?/usr/local/lib/R/site-library/Rmap?

The error is easily reproducible, as it's caused by the lack
of Rd documentation in the "man" directory; adding even one
Rd file solves the problem. It's clearly a corner case (yes. I'm
lazy and should have written the documentation a long time
ago), but if you think it's worth the time it would be better to
have a clearer error message from R CMD check.

P.S.: this is on an updated Debian Sid:

[fizban@~/Rmap]:dpkg -l | grep "ii  r-" | grep -v cran
ii  r-base                               2.9.0-4
GNU R statistical computation and graphics system
ii  r-base-core                          2.9.0-4
GNU R core of statistical computation and graphics system
ii  r-recommended                        2.9.0-4
GNU R collection of recommended packages [metapackage]

Thanks for your time,
  Marco Scutari

-- 
Marco Scutari, Ph.D. Student
Department of Statistical Sciences
University of Padova, Italy
"Facts don't care if you feel good about them." Slashdot, 25/10/07



[Rd] cryptic error message from R CMD check
Marco Scutari