[R] Creating a minimal package (was: where does R search when source()?)

Gabor Grothendieck ggrothendieck at myway.com
Sun Jul 11 23:28:44 CEST 2004


Duncan Murdoch <dmurdoch <at> pair.com> writes:

: 
: On Sun, 11 Jul 2004 05:40:33 +0000 (UTC), Gabor Grothendieck
: <ggrothendieck <at> myway.com> wrote:
: 
: >Roger,
: >
: >A list of the steps referred to below would be of interest.
: >I realize the extensions manual exists but what I was
: >thinking of was just a list of the minimal steps you take
: >when you create a package for yourself.
: 
: There's really just one step: call package.skeleton().
: 
: Duncan Murdoch

I was hoping for something that really was that simple but
I tried and so far it seems that I also must also 

1. when I run skeleton.package realize that I must use the arg
   path = "library"
   The example that is shown there appears to omit that.

2. download and install tools.zip, perl and windows help as listed at:

   http://www.murdoch-sutherland.com/Rtools/

I got tripped up for quite a while when it could not find hhc.exe and
I finally realized I had not downloaded the windows help distribution.

3. change the name of the package in the DESCRIPTION file -- it seems
that the name = arg on package.skeleton did not change it for me.

4. make changes to the documentation files.  I am just working on this
now.  Some default null documentation exists but it appears that it
MUST be modified in order to get a working package so this makes another
step.

There maybe other things but its taken me several hours just to get
this far and I do not yet have a functioning package.

I think it would be handy if everything you need to know to actually
create a minimal functioning package were in ?skeleton.package
so that one could create a minimal functioning package without actually
reading the extensions manual and then incrementally improve it.  Right
now there is quite a bit you have to know just to get to that point.

I have so far looked at skeleton.package, readme.packages in rw1091,
murdoch-suthertherland.com link mentioned above and the extensions manual
so the startup to doing this is really a multi-step complex process.

The skeleton.package idea actually seems quite nifty but I think it
needs more work before one can really claim that its a one-step process
to create the example package.




More information about the R-help mailing list