[R] install-packages

Göran Broström gb at stat.umu.se
Thu May 29 19:18:36 CEST 2003


On Thu, 29 May 2003, Uwe Ligges wrote:

> Göran Broström wrote:
> > When I try 'install-packages' (from menu) in R-1.7.0 (Windows), I get 
> > 
> > 
> >>install.packages(choose.files('',filters=Filters[c('zip','All'),]), 
> > 
> > .libPaths()[1], CRAN = NULL)
> > Error in file(file, "r") : unable to open connection
> > In addition: Warning message: 
> > cannot open file `eha060/DESCRIPTION' 
> 
> 
> >  but it works with R-1.6.2. It also works if I manually unzip 
> > 'eha060.zip' in the right place.
> > 
> > 'eha' is an R package written by myself, and since I intend to send it to 
> > CRAN soon, I'm worried that I have built it incorrectly. I usually work on 
> > Linux, and I built eha there. Then I copied the resulting .tar.gz file to
> > a Windows 2000 machine with Ripley's tools installed and installed it by
> > 'Rcmd INSTALL ...'. So far, so good, everything works. Then I zipped the 
> > catalogue 'eha' to get 'eha060.zip',
> 
> That might be the problem: Zip it with the tools collection, most easily 
>   using the (recommended) way described below.

I used Brian's tools

> 
>  >  and this file doesn't work with
> > 'install.packages', however with 'unzip'.
> > 
> > Is the error with me or with 1.7.0? I have seen the reports on failures 
> > with bundles, but 'eha' is not a bundle.
> > 
> > Thanks,
> > 
> > Göran
> 
> 
> - Use  Rcmd INSTALL --build  ....  to create the Windows binary version 
> of the package.

Thanks, that worked!

> - Does the package pass R CMD check under Linux / Rcmd check under Windows?

Yes / Yes
 
> - Be sure not to have loaded (an old version of) the package before 
> trying install.packages(), because files may be locked.
> 
> - Follow readme.packages in .../src/gnuwin32 *exactly*.

Actually, I couldn't find 'Rcmd INSTALL --build' there, so thank you for
enlightening me! (I usually follow instructions exactly, I learned that 
the hard way the first (and last :)) time I installed  R  from source on 
Windows!)

Göran




More information about the R-help mailing list