[R] R 1.9.1 package installation problems
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Fri Jun 25 22:02:36 CEST 2004
"Erik T. Ray" <etr at ravelgrane.com> writes:
> Hello,
>
> I am writing as an administrator, not as an R user, so forgive me if I
> am not completely knowledgeable about R.
>
> 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. 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.
Yes, Windows will do that sort of thing to you. This stems from
the Zelig sources themselves,
[pd at titmouse tmp]$ tar tvfz ~/Zelig_1.1-2.tar.gz | grep -i /zelig.Rd
-rw-r--r-- king/king 2905 2004-04-17 02:53:49 Zelig/man/Zelig.Rd
-rw-r--r-- king/king 2779 2004-06-18 23:13:21 Zelig/man/zelig.Rd
but pretty obviously, that's a bad idea.... Incidentally, "R CMD
check" finds multiple problems with the package, but filenames
differing only in case is not among them, so it looks like the checker
could need improvement in that area.
> 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.
The OS can't tell them apart, so it's a small wonder...
> So I have two problems. First, MD5 checksums are not being generated
> correctly by the cross builder. 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.
>
> Does anyone else notice this problem, or is it a known issue? Is there
> a workaround?
Rename the source files! I don't think there's any other solution.
It might be worth digging into the MD5 issue a bit more. Should be
completely orthogonal to the file name issue:
[pd at titmouse tmp]$ md5sum test1.tex
0a158be8f97a4134ab648d90b009e850 test1.tex
[pd at titmouse tmp]$ cp test1.tex TEST1.TEX
[pd at titmouse tmp]$ md5sum TEST1.TEX
0a158be8f97a4134ab648d90b009e850 TEST1.TEX
[pd at titmouse tmp]$ openssl dgst -md5 test1.tex
MD5(test1.tex)= 0a158be8f97a4134ab648d90b009e850
However, there might be an issue with zip/unzip if it converts to CRLF
line endings or such.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list