[R] Installing on Windows packages build on Unix

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Jun 27 23:06:20 CEST 2004


"Harolddd" <baize at 3dculture.com> writes:

> > Giovanni Petris wrote:
> > 
> >> Hello,
> >>
> >> I wanted to share with a colleague a few R functions that I wrote. To 
> >> this purpose, I created a small package on my machine (Unix) and  
> >> emailed it to her. Now she is having troubles installing the package  
> >> on her Windows machine. It seems that on her side, install.packages
> >> looks for a "zip" file - while I have created a "tar.gz" file. I tried
> >> to build the package with the --use-zip options but that didn't work.
> >>
> >> Any suggestions?
> >>
> >> TIA,
> >> Giovanni
> >>
> 
> Your Windows using friend can convert the "tar.gz" file to 
> "zip" using the open-source utility "7-zip". Available at 
> http://www.7-zip.org/  It doesn't conform to many Windows 
> conventions, so reading the help files will be necessary. 
> I found that it was necessary to extract a "tar.gz" file 
> twice, once to extract from "gz" and again for "tar". 

Ack! No!

Windows packages are *binary* packages, Unix's are *source* packages.
Using a conversion tool to let one masquerade as the other is not
going to cause anything but trouble. We're having trouble enough with
people using WinZip and it's treatment of .tar.gz files as "just
another kind of ZIP".

One thing that *might* work for a package with no compiled code (it
used to work, but I'm not sure it still does) is to install the
package under Unix and then use zip to wrap up the installed files:

E.g.

  mkdir tmp
  R CMD INSTALL mypkg -l tmp
  cd tmp
  zip -lr mypkg mypkg

-- 
   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