[R] Creating a minimal package (was: where does R search when source()?)
Duncan Murdoch
dmurdoch at pair.com
Mon Jul 12 04:22:32 CEST 2004
Thanks for the information. It *should* be that simple; thanks for
pointing out ways in which it is not.
Some more specific comments below...
On Sun, 11 Jul 2004 21:28:44 +0000 (UTC), Gabor Grothendieck
<ggrothendieck at myway.com> wrote:
>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.
The default is to put it in the current directory. The assumption is
that you started R where you want to work, or have switched to that
directory later. This is usually true for Unix users, but generally
not for Windows users.
I'm not sure what sort of change to make here. path = "library"
(literally) won't usually work, because it won't try to create the
directory. Suggestion?
>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.
Something I've meant to do for a long time (and got started on, once)
is to write a program that checks your system for the package building
requirements. Just run it, and it'll tell you what it thinks is
missing (and how to find it).
>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.
Sounds like an oversight to me, but very easy to fix.
>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.
Should also be pretty easy to fix...
>
>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.
That's a good point. I think we're moving towards a point where Perl
won't be necessary; the other tools are mostly reasonably small, and I
think we could set things up so that the install process worked with
or without HHC.
>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