Dear HelpeRs, I have created a tar.gz package (the package was created on unix) and I would like to install it in R on a Windows operating system. As far as I know, R in Windows accepts only packages in zip file for installation and I could not find a way to install a tar.gz file. I would like to mention that I installed the package on unix using install.packages and it works. I also tried to decompress the tar.gz file and create a zip file but the installation of the resulting zip files gives me errors. Any help would be greatly appreciated, Thank you, Georgiana [[alternative HTML version deleted]]
on 07/31/2008 03:07 PM georgiana onicescu wrote:> Dear HelpeRs, I have created a tar.gz package (the package was > created on unix) and I would like to install it in R on a Windows > operating system. As far as I know, R in Windows accepts only > packages in zip file for installation and I could not find a way to > install a tar.gz file. I would like to mention that I installed the > package on unix using install.packages and it works. I also tried to > decompress the tar.gz file and create a zip file but the installation > of the resulting zip files gives me errors. Any help would be greatly > appreciated, Thank you, GeorgianaIf you are going to be cross-building, you should read this article: ?Building Microsoft Windows Versions of R and R packages under Intel Linux? by Jun Yan and A. J. Ross http://cran.us.r-project.org/doc/contrib/cross-build.pdf Also see Section 3.1.9 in the R Admin Manual: http://cran.r-project.org/doc/manuals/R-admin.html I have not done this myself, so I would have to defer to others relative to any gotchas. Much of any complexity will likely be based upon whether you have any compiled code (eg. C or FORTRAN) or just R code. In addition, if you truly mean Unix (eg. Solaris, AIX, etc.) and not Linux, that will likely introduce other issues, but again, I defer to others. HTH, Marc Schwartz
> Dear HelpeRs, > I have created a tar.gz package (the package was created on unix) > and I would like to install it in R on a Windows operating system. > As far as I know, R in Windows accepts only packages in zip file for > installation and I could not find a way to install a tar.gz file. > I would like to mention that I installed the package on unix using > install.packages and it works. I also tried to decompress the tar.gz > file and create a zip file but the installation of the resulting zip > files gives me errors.If your package doesn't contain any compiled C code (or link against external libraries), simply unpacking the binary .tar.gz package (I've done this on a Mac, but Linux/Unix should work just as well) and re- packing it as a .zip archive worked for me. Two caveats: - make sure that the ZIP archive is just named <package>_<version>.zip, otherwise R might think it's for a different version or operating system and may refuse to install it - you won't get proper Windows help pages for the functions in the package, only the ASCII versions; last time I tried this, they worked fine (on R for Windows 2.5.1), at least if called from the command-line I know this doesn't build a proper package, but it's a quick solution without having to set up a Windows machine or a cross-building environment. Once the package is reasonably mature, you can simply upload it to CRAN and let the wonderful people there build the Windows binary for you. :-) Best regards, Stefan Evert [ stefan.evert at uos.de | http://purl.org/stefan.evert ]
On 31/07/2008 4:07 PM, georgiana onicescu wrote:> Dear HelpeRs, > I have created a tar.gz package (the package was created on unix) and I would like to install it in R on a Windows operating system. > As far as I know, R in Windows accepts only packages in zip file for installation and I could not find a way to install a tar.gz file. > I would like to mention that I installed the package on unix using install.packages and it works. I also tried to decompress the tar.gz file and create a zip file but the installation of the resulting zip files gives me errors. > Any help would be greatly appreciated,If you have the Rtools on Windows (available from http://www.murdoch-sutherland.com/Rtools, get the installer Rtools28.exe), then you can install it in Windows using install.packages("foo.tar.gz", repos=NULL, type="source") or from a command line using Rcmd INSTALL foo.tar.gz It's pretty much the same as on Unix, except that most people don't have the tools. Duncan Murdoch
For cross-building a mature package, I stumbled across a convenient utility provided by the R Windows maintainer: _http://win-builder.r-project.org/ _This takes a little while, so for iteration it is much better to install the Rtools, but for a package or two it is great. Best, Andrew Harris, Univ. Maryland