[R] writing a simple package in R 2.0 under Windows XP

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Nov 7 16:00:40 CET 2004

On Sun, 7 Nov 2004, H Patrick Giraudoux wrote:

> Dear listers,
> I have developped a set of functions that I would like to package on a 
> Windows XP plateform for some friends (this would be more simple than to 
> deliver them as a source text file without handy help). I am working under 
> Windows XP.
> Of course I have gone through the manual "Writing R extension" and try to 
> sort out what a most simple "packaging" for beginner (without compiled 
> code, etc...)  could be. I also read 
> http://www.rap.ucar.edu/staff/ericg/RWinBuild.html It is very easy to build 
> R packages in Windows (for Windows)...
> Perl has been installed and works fine C:\Perl (source 
> http://www.activestate.com/Products/ActivePerl/Download.html).
> R Tools have been installed: C:\Perl\Rtools (source: 
> http://www.murdoch-sutherland.com/Rtools/tools.zip)
> R tools functions delivered work fine (ex: ls, etc...)
> R has been installed "at the root" of C:\ to avoid any blank in directory 
> names: C:\R\rw2000
> The PATH has been defined as environment variable in Windows XP as: 
> C:\Perl\Rtools;C:\Perl\bin;...;C:\R\rw2000\bin
> A trial package named "AnExample" has been prepared as indicated in the 
> example of package.skeleton() of the library "utils" and put in C:\
> from there I have typewritten:
> C:\>RCMD build AnExample

Did you want to package up the sources of a package you haven't tested?
Surely you wanted to install and test it first?

> With this result:
> Can't open perl script "C:\R\rw2000/bin/build": No such file or directory

A Perl script is not `build.exe': this really is just 'build'.

> I could catch that indeed 'build.exe' does not exist in this directory 
> (which is true...) and tried to find it somewhere on my c: disk. 
> Unfortunately, this 'build' or 'build.exe' file does not exist nor a 
> 'check' file, nor any complementary command of Rcmd
> After some research hours (actually since yesterday...), I cannot find 
> where I have got wrong yet... and considering the result, I am sure I got 
> somewhere!

You apparently DEselected the installation of the source package tools 
when you installed R.  You need to go back and install them.

> Can somebody help me on this?
> Thanks in advance,
> Patrick Giraudoux
> 	[[alternative HTML version deleted]]

You apparently missed the comment about HTML mail in the posting guide.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.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

More information about the R-help mailing list