[R] Building R packages under Windows.

Duncan Murdoch murdoch at math.aau.dk
Mon Apr 11 16:58:05 CEST 2005


Gabor Grothendieck wrote:

> Other resources are:
> - http://www.murdoch-sutherland.com/Rtools/

My plan is that this is only going to include updates of the information 
in the R Admin manual, e.g. when a new version of one of the tools is 
available, this page will give advice on whether to use it or not.

> - README.packages in \Program Files\R\rw2001 or whatever version of R

As mentioned, all of this has moved into the admin manual.

> - posts by me, John Fox, Andy Liao in r-help or r-devel
> 
> I use Windows XP and it also took me quite a bit of time until I 
> figured it out too.  I was really wondering as I got frustrated how
> it was possible that 500+ packages got developed for R when it
> was so hard to figure out how to create a package, particularly
> if you want to put in a vignette.  One of the problems is that its
> dependent on so many other pieces of software and also there can
> be path problems that you have to figure out.  I suspect that the process
> is somewhat smoother under UNIX and maybe most people use
> that.  
> 
> Fortunately, it does all work once you get it figured out
> and its worth it if you are going to do a lot of development since
> it really helps organize you.   If you are just going to use it briefly
> or casually its probably not worth the hassle.  Once you do figure
> it out it does work although there are a few annoyances.
> R CMD CHECK is really great although I wish there were some 
> way of telling it to ignore the files referenced in .Rbuildignore so 
> one does not have to do a build first.  Also the error messages
> from the process are often less than helpful but I suspect it would
> be difficult to improve since it can go wrong at a point which is
> different than the source of the problem.
> 
> I think the fixable problems are:
> - a guide is needed, as you mention

Comments on the new organization are welcome.  They'll be unlikely to 
make it into 2.1.0, but 2.1.1 or 2.2.0 will benefit from them.

> - the prerequisites need to be reduced:
>   -- significant portions are written in perl which is probably a 
>      holdover from the days when R was less powerful and now
>      could all be ported to R

This would be nice, but, as you say, there's a significant amount of 
work there.  It seems to me that giving instructions on how to install 
Perl is a lot easier, and the work a user does in installing Perl is 
small compared to all the other things someone writing a package would 
be doing, and only needs to be done once.  So I have no intention of 
redoing this, and wouldn't even be all that enthusiastic about testing a 
submission of rewrites from someone else.

>   -- it would be nice it the tools were not needed either. 

I don't think this is likely any time soon.  The tools are there to 
provide "make" and a Unix-like environment in which to run it.  I don't 
think it's likely anyone would rewrite make in R.  Some of the other 
tools could be replaced with R code, but since you're installing one, 
why not install several?

>   -- reduced functionality with no Microsoft style help should be
>      possible to optionally allow one to create packages without
>      downloading the Microsoft help compiler

This is possible, by editing the MkRules file and/or using the --docs=normal
option to BUILD or INSTALL.  I've just fixed up the R-admin description 
a bit to make this clearer.

> - the TEXINPUTS problems with MiKTeX needs to be solved
>   by MiKTeX (they know about it and intend to solve it but I am
>   not sure how quickly that will happen.  In the meantime there
>   are workarounds at:
>      http://www.murdoch-sutherland.com/Rtools/miktex.html
>   The fourth alternative is the easiest.  I think this only affects
>   you if you are building vignettes.)

I'm no longer sure they intend to fix it.  Since I wrote those 
instructions, they came out with a new release that breaks one of the 
workarounds.

Duncan Murdoch




More information about the R-help mailing list