On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and R CMD install. This was all with the file mystuff.tar.gz. Now I want to install "mystuff" on my windows workstation. Can I use the same file mystuff.tar.gz. Do I need to do something different with R CMD build? Ideally somebody has a tutorial for porting from linux to windows this way. Thanks for your time.
On 28/10/2009, at 12:20 PM, David Lubbers wrote:> On my linux workstation I have a nice, very little project in a > directory called "mystuff" > > I installed "mystuff" into site-library with R CMD build, R CMD check > and R CMD install. This was all with the file mystuff.tar.gz. > > Now I want to install "mystuff" on my windows workstation. Can I use > the same file mystuff.tar.gz. Do I need to do something different > with > R CMD build? > > Ideally somebody has a tutorial for porting from linux to windows this > way.If the package ``mystuff'' does not involve compiling any Fortran or C code then it's simple: Go to the directory, i.e. library, where ``mystuff'' is installed. (NB: You want the *installed* version, not the source version.) Executed zip -r mystuff.zip mystuff Transport mystuff.zip to the Windoze machine. Then do the usual clickety-click thing to ``install from local zip files'' (I forget the actual wording.) And there you go. If there is C or Fortran code to be dynamically loaded then this code must be compiled under Windoze. This is possible, but tricky and you need to make sure that all sorts of non-standard tools are installed on your Windoze machine. Duncan Murdoch has produced a set of instructions for getting through the maze, but I forget where. Doing an RSiteSearch() will probably turn it up for you. Alternatively you can use the facility: http://win-builder.r-project.org which is provided by Uwe Ligges, bless his heart. Remember this is necessary only if ``mystuff'' depends on C or Fortran code. cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
On Oct 27, 2009, at 6:20 PM, David Lubbers wrote:> On my linux workstation I have a nice, very little project in a > directory called "mystuff" > > I installed "mystuff" into site-library with R CMD build, R CMD check > and R CMD install. This was all with the file mystuff.tar.gz. > > Now I want to install "mystuff" on my windows workstation. Can I use > the same file mystuff.tar.gz. Do I need to do something different > with > R CMD build? > > Ideally somebody has a tutorial for porting from linux to windows this > way. > > > Thanks for your time.The package source tar file is not directly installable on Windows. You need to create a .zip 'binary' package file. There is a cross-building document here by Rossini and Yan: http://cran.r-project.org/doc/contrib/cross-build.pdf and the associated makefile here: http://cran.r-project.org/doc/contrib/Makefile-rcb I have not looked at them in detail relative to their applicability to current versions of R, as they are a rather dated (circa 2003). So caveat emptor. If you might consider just directly building the packages on your Windows system, Duncan provides an easy Windows installation that contains the requisite tools (C and FORTRAN compilers, vanilla Perl, etc.) here: http://www.murdoch-sutherland.com/Rtools/ along with others that are referenced in the R-Admin Manual Windows Toolset Appendix: http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows- toolset would enable you to build your package on Windows, including any C or FORTRAN code that you might have in the package. HTH, Marc Schwartz