Hi, I made a package on a linux box. All worked fine. The package contains only R code (no C). I then wanted to make a zip file so that I could test the package on a windows machine. I have tried all the obvious ways to do this (and even some that are not!), but to no avail. The only instructions I find about building packages for windows (e.g. mypkg.zip) seem to imply that the build be done on a windows machine. Is there a simple way to make mypkg.zip under linux and then install it as a zip file on a windows machine? Sincerely, Halldor -- ------------------------------------------ Halldor Bjornsson (halldor at vedur.is) Vedurstofa Islands (Icelandic Met. Office) Bustadavegur 9, IS-150, Reykjavik, Iceland
On Wed, 5 Jan 2005, [ISO-8859-1] Halldor Björnsson wrote:> I made a package on a linux box. All worked fine. > The package contains only R code (no C). I then wanted to make a zip file so > that I could test the package on a windows machine.Why? R works the same on Windows and Linux.> I have tried all the obvious ways to do this (and even some that are > not!), but to no avail. The only instructions I find about building > packages for windows (e.g. mypkg.zip) seem to imply that the build be > done on a windows machine.You've not noticed the section on cross-building: it _is_ documented in README.packages (in the Windows installation, and in the sources).> Is there a simple way to make mypkg.zip under linux and then install it as a > zip file on a windows machine?The following *may* work (it _is_ the obvious way so you have probably tried it?). On the Linux (or any other OS) box cd R_HOME/library zip -r9X mypkg mypkg Send mypkg.zip to the Windows box. On the Windows box unzip mypkg.zip -d /path/to/R/library I've just tried 'urn' and it worked for me. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, 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
On Wed, 2005-01-05 at 09:34 +0000, Halldor Bj?rnsson wrote:> Hi, > I made a package on a linux box. All worked fine. > The package contains only R code (no C). I then wanted to make a zip > file so that I could test the package on a windows machine. I have tried > all the obvious ways to do this (and even some that are not!), but to no > avail. The only instructions I find about building packages for windows > (e.g. mypkg.zip) seem to imply that the build be done on a windows machine. > > Is there a simple way to make mypkg.zip under linux and then install it > as a zip file on a windows machine? > > Sincerely, > HalldorI have not used it, but there is an article in the Contributed Documentation section on the main R web site by Jun Yan and Tony Rossini called "Building Microsoft Windows Versions of R and R packages under Intel Linux". A direct link to the PDF is: cran.r-project.org/doc/contrib/cross-build.pdf and there is a makefile at: cran.r-project.org/doc/contrib/Makefile-rcb HTH, Marc Schwartz
Hi I do it for the geoR package following the excelent and detailed instructions provided by Yan and Rossini: "Building Microsoft Windows Versions of R and R packages under Intel Linux" available at the Contributed Documentation in the R web-site Notice that not having C/Fortran/C++ code make the process even simpler. P.J. On Wed, 5 Jan 2005, Halldor Bj?rnsson wrote:> Hi, > I made a package on a linux box. All worked fine. > The package contains only R code (no C). I then wanted to make a zip > file so that I could test the package on a windows machine. I have tried > all the obvious ways to do this (and even some that are not!), but to no > avail. The only instructions I find about building packages for windows > (e.g. mypkg.zip) seem to imply that the build be done on a windows machine. > > Is there a simple way to make mypkg.zip under linux and then install it > as a zip file on a windows machine? > > Sincerely, > Halldor > -- > ------------------------------------------ > Halldor Bjornsson (halldor at vedur.is) > Vedurstofa Islands (Icelandic Met. Office) > Bustadavegur 9, IS-150, Reykjavik, Iceland > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! R-project.org/posting-guide.html > >Paulo Justiniano Ribeiro Jr LEG (Laborat?rio de Estat?stica e Geoinforma??o) Departamento de Estat?stica Universidade Federal do Paran? Caixa Postal 19.081 CEP 81.531-990 Curitiba, PR - Brasil Tel: (+55) 41 361 3573 Fax: (+55) 41 361 3141 e-mail: paulojus at est.ufpr.br est.ufpr.br/~paulojus
> From: Marc Schwartz > > On Wed, 2005-01-05 at 09:34 +0000, Halldor Bj?rnsson wrote: > > Hi, > > I made a package on a linux box. All worked fine. > > The package contains only R code (no C). I then wanted to > make a zip > > file so that I could test the package on a windows machine. > I have tried > > all the obvious ways to do this (and even some that are > not!), but to no > > avail. The only instructions I find about building > packages for windows > > (e.g. mypkg.zip) seem to imply that the build be done on a > windows machine. > > > > Is there a simple way to make mypkg.zip under linux and > then install it > > as a zip file on a windows machine? > > > > Sincerely, > > Halldor > > > I have not used it, but there is an article in the Contributed > Documentation section on the main R web site by Jun Yan and > Tony Rossini > called "Building Microsoft Windows Versions of R and R packages under > Intel Linux". > > A direct link to the PDF is: > > cran.r-project.org/doc/contrib/cross-build.pdf > > and there is a makefile at: > > cran.r-project.org/doc/contrib/Makefile-rcb > > HTH, > > Marc SchwartzIf the package has no compiled code, the cross-compiling setup Marc mentioned might be an overkill. I just tried the following with a local package: On Linux (SLES8 for x86_64): R CMD INSTALL -l localRlib mypkg_x.x-x.tar.gz cd localRlib zip -r mypkg mypkg Now ftp the file mypkg.zip to the Windows box. On the Windows box: Start up Rgui Use the menu Packages / Install Package(s) from Local zip file(s) Select the file mypkg.zip That seems to work fine for me, with R-2.0.1 on both end. Best, Andy