[R] R 1.9.1 package installation problems

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 25 21:50:15 CEST 2004


On Fri, 25 Jun 2004, Erik T. Ray wrote:

> I am writing as an administrator, not as an R user, so forgive me if I 
> am not completely knowledgeable about R.

(We might expect you to know about file systems, surely?)

> I have a user who is creating an R package for windows from a Linux 
> environment using the crossbuild environment by Jun Yan and A.J. 
> Rossini. 

I can't comment on that environment (I can't even find it despite having
read an article in R-News about a Makefile by those authors).  However,
the R team provides (and documents) cross-building, so why not use that
instead?

> The packages she generated worked fine until she tried to 
> install in R 1.9.1 for Windows. Now when she installs with
> 
>    install.packages( "Zelig", CRAN="http://gking.harvard.edu" )
> 
> it results in two errors.
> 
> First, it claims there are some missing files. When I look in the zip 
> file, the files are there, but they coexist with other files that have 
> the same name differing only in case. So there is both 'help/zelig' and 
> 'help/Zelig', and this is causing R to think that one of them is 
> missing.

For your information, Windows filenames are case-insensitive, and zelig
and Zelig cannot exist in the same directory.  So the problem lies with
the package in using such name pairs.  The R documentation does warn about
this, and R's tools do check for it. That package should fail `R CMD
check' -- this should be reported to its author.

> Second, R says that many of the files have bad MD5 checksums. I 
> generated some MD5 digests using the linux command 'openssl dgst -md5' 
> and compared against the ones created by the R Crossbuild script. They 
> are different. So I made a new MD5 file and stuck it in the package. 
> This time, the installation resulted in just three files having bad 
> checksums, and they happen to be the counterparts to the "missing" 
> files. In other words, it claims that "html/zelig" is missing, and 
> "html/Zelig" has a bad MD5 checksum.

Not so for packages built with the R team's tools - I have just checked 
one.  It is quite likely that the transfer of files corrupted the files -- 
how was that done?  (We do not support direct cross-building of package 
zip files, mainly because of pitfalls at this stage. My guess is that the 
line endings got changed from LF to CRLF.)

You can just delete the MD5 file if you are sure the files are correct.

> So I have two problems. First, MD5 checksums are not being generated 
> correctly by the cross builder. 

You present no evidence for that claim, and I cannot reproduce it.

> At worst, I could re-generate those, so 
> it is not a big deal. More problematic, there seems to be a bug in the 
> way R 1.9.1 for windows imports packages that contain files whose names 
> differ only by case.

A bug in the package, compounded by the user not running R CMD check.

> Does anyone else notice this problem, or is it a known issue? Is there 
> a workaround?

R CMD check
Care in moving files between file systems.

Hope that helps ....

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list