[R] Porting Custom Packages from Linux to Windows
Marc Schwartz
marc_schwartz at me.com
Wed Oct 28 01:34:26 CET 2009
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
More information about the R-help
mailing list