[Rd] wishlist: building packages

Gabor Grothendieck ggrothendieck at myway.com
Sun Nov 7 14:50:51 CET 2004

I have collected together some wishlist items from my
recent experience in package building.  Some of these
are also in other posts but I thought I would put them
in one place.  This all refers to Windows XP R 2.0.1 beta.

1. Would it be possible to put the whole package building 
process into R, at least for packages that do not use C,
so (a) one could leverage R's debugging facilities?  (b) The other
problem that this would address is that there are UNIX-like 
commands used by the scripts on Windows including find which conflicts 
with a Windows command.  Without scripts there would be no conflict.  
I had to change my PATH to put the UNIX-like tools ahead of the
Windows commands which I was really loathe to do.
(c) Also, it would presumably make the process more similar on 
different platforms.  It seems that like a significant portion of the 
package building process is already in R anyways.

2. The idea of R CMD check is nice.  One QA sort of feature
that would be nice would be to add some metrics to the output:
- number of top level functions, number of documented functions
- number of lines of code for suitable definition of lines
Since one normally runs check anyways it would be nice if 
getting this were just a side effect of running check so that
one does not need to issue additional commands.

3. On windows there can be problems when one uses backslashes
in path names, as noted in several recent posts.  Perhaps this 
could be addressed by either a warning, error or changing the 
process to accept backslashes.

4. In a recent post it was discussed that sometimes one gets
error messages referring to an intermediate R file but no 
message regarding where to find the file or what its name is.

5. It seems like there is quite a bit of information to digest
to build a package.  I found it quite overwhelming.  I guess
with 400+ packages enough people were able to overcome this but
it would still be nice if the prerequisites could be simplified
as much as possible.  I had successfullly built some small toy packages
before to convince myself I could do it but once faced with a
larger package (50-100 functions) I came up against problems that 
I had not previously seen and found I had to know more.

6. This is not an R problem, per se, but I probably spent about
an hour on trying to configure MikTeX to get it to work with
the build process.  There is probably nothing that can be done
as its already documented how to get around them but I hope
that MiKTeX gets some improvements here.

More information about the R-devel mailing list