I have R 1.9.0 running under Solaris 2.9 ona SunBlade 100, and am very happy with it. I heard about the stuff at www.rmetrics.org and thought it might be worth looking at. However, what I found there is a bunch of .zip files. The entry page suggests that there is some way to install packages from .zip files in R, but I have searched all the documentation I have and cannot find it. _Is_ there a way to install a package from a local .zip file in R 1.9.0 for Unix, and if so, what is it?
On Wed, 19 May 2004, Richard A. O'Keefe wrote:> I have R 1.9.0 running under Solaris 2.9 ona SunBlade 100, and am > very happy with it. I heard about the stuff at www.rmetrics.org and > thought it might be worth looking at. However, what I found there is > a bunch of .zip files. The entry page suggests that there is some > way to install packages from .zip files in R, but I have searched all > the documentation I have and cannot find it. > > _Is_ there a way to install a package from a local .zip file in > R 1.9.0 for Unix, and if so, what is it?Unzip it into a suitable dir, then R CMD INSTALL. -- 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
I asked about installing R packages from ZIP files, specifically with respect to the Rmetrics packages. "Sean Davis" <sdavis2 at mail.nih.gov> asked: Have you tried R CMD INSTALL filename.zip? If that didn't work, could you simply unzip filename.zip and install using R CMD INSTALL filename? If you can't unzip the zip files (using command unzip), that may be the problem. Yes, I have tried R CMD INSTALL filename.zip, and it doesn't work. I can unzip the files, and I get perfectly reasonable-looking directory trees when I do this (except for the thrice-accursed MS-DOS carriage returns all over the place, which presumably do R no harm). f% ls -l *.zip -rw-r--r-- 1 ok comsci 472733 May 19 13:57 evir_1.0.zip -rw-r--r-- 1 ok comsci 1391119 May 19 14:01 fBasics_190.10051.zip -rw-r--r-- 1 ok comsci 255366 May 19 13:56 fExtremes_190.10051.zip -rw-r--r-- 1 ok comsci 370293 May 19 13:57 fOptions_190.10051.zip -rw-r--r-- 1 ok comsci 938564 May 19 13:59 fSeries_190.10051.zip f% unzip -l evir_1.0.zip Archive: evir_1.0.zip Length Date Time Name ------ ---- ---- ---- 1875 11-21-02 14:24 evir/INDEX 37 11-21-02 14:24 evir/TITLE 2174 11-21-02 14:24 evir/RCHANGES 1923 11-21-02 14:24 evir/README 624 11-21-02 14:24 evir/DESCRIPTION 0 11-21-02 14:24 evir/R/ 49555 11-21-02 14:24 evir/R/evir 0 11-21-02 14:24 evir/demo/ 246 11-21-02 14:24 evir/demo/00Index ... 0 11-21-02 14:24 evir/data/ 367 11-21-02 14:24 evir/data/00Index ... 0 11-21-02 14:24 evir/man/ 41581 11-21-02 14:24 evir/man/evir.Rd ... 0 11-21-02 14:24 evir/help/ 644 11-21-02 14:24 evir/help/AnIndex ... 0 11-21-02 14:24 evir/html/ 4867 11-21-02 14:24 evir/html/00Index.html ... 1165 11-21-02 14:24 evir/html/bmw.html 0 11-21-02 14:24 evir/latex/ 781 11-21-02 14:24 evir/latex/bmw.tex ... 0 11-21-02 14:24 evir/R-ex/ 295 11-21-02 14:24 evir/R-ex/decluster.R ... 4971 11-21-02 14:24 evir/CONTENTS 0 11-21-02 14:24 evir/chtml/ 52043 11-21-02 14:24 evir/chtml/evir.chm 0 11-21-02 14:24 evir/ ------ ------- 1150125 161 files But f% /users/local/bin/R CMD INSTALL evir_1.0.zip gzip: evir_1.0.zip has more than one entry--rest ignored tar: tape blocksize error error: cannot extract package from 'evir_1.0.zip': No such file or directory for reading errors. f% /users/local/bin/R CMD INSTALL fBasics_190.10051.zip gzip: fBasics_190.10051.zip has more than one entry--rest ignored tar: blocksize = 0 error: cannot extract package from 'fBasics_190.10051.zip': No such file or directory for reading errors. f% /users/local/bin/R CMD INSTALL fExtremes_190.10051.zip gzip: fExtremes_190.10051.zip has more than one entry--rest ignored tar: blocksize = 0 error: cannot extract package from 'fExtremes_190.10051.zip': No such file or directory for reading errors. R CMD INSTALL --help talks about *making* ZIP files, but says nothing about *using* ZIP files. I would have assumed, on the grounds of silence, that R couldn't install from ZIP files except that www.rmetrics.org evidently think it *can*. The suggestion to unzip the file and then pass the name of the *directory* (not a plain file) to R CMD INSTALL seems to be working. Perhaps one sentence could be added to ?INSTALL or R CMD INSTALL --help saying "To install from a ZIP file, first unzip the file and then install the resulting directory."