carol white
2010-Apr-22 12:09 UTC
[R] install or uncompress package build in one platform in another platform
Hi, Is an R package built under Unix (package.tar.gz) could be installed on other platforms like windows or Mac? The compressed tar file (.tar.gz) built under Unix doesn't seem to be uncompressed under windows (unzip under windows instead of gunzip). How to proceed? Look forward to your reply, Carol
David Winsemius
2010-Apr-22 13:34 UTC
[R] install or uncompress package build in one platform in another platform
On Apr 22, 2010, at 8:09 AM, carol white wrote:> Hi, > Is an R package built under Unix (package.tar.gz) could be installed > on other platforms like windows or Mac? The compressed tar file > (.tar.gz) built under Unix doesn't seem to be uncompressed under > windows (unzip under windows instead of gunzip). How to proceed? >If it has only R code then on a Mac the Archive Utility.app would decompress a tar.gz file and give you a package folder that you could put into the appropriate location in your Library. If it has compiled code then no, forget it. There must be ways to ungzip and untar files in Windows. -- David Winsemius, MD West Hartford, CT
Duncan Murdoch
2010-Apr-22 14:58 UTC
[R] install or uncompress package build in one platform in another platform
On 22/04/2010 8:09 AM, carol white wrote:> Hi, > Is an R package built under Unix (package.tar.gz) could be installed on other platforms like windows or Mac? The compressed tar file (.tar.gz) built under Unix doesn't seem to be uncompressed under windows (unzip under windows instead of gunzip). How to proceed?Use either "R CMD INSTALL foo.tar.gz" at the cmd prompt, or from within R, install.packages("foo.tar.gz", repos=NULL, type="source"). R knows how to do the decompression. If the package contains external code, this requires that you have the tools set up to compile it; see www.murdoch-sutherland.com/Rtools to get them for Windows. Most Windows users find it tricky to get the setup right at first, which is why we provide binaries for CRAN packages, and why Uwe provides the http://win-builder.r-project.org/ service. Simon Urbanek has a web page to provide the tools for the Mac. Duncan Murdoch