[R] To package or not to package?
Duncan Murdoch
murdoch at stats.uwo.ca
Sat Aug 16 20:09:07 CEST 2008
On 16/08/2008 1:54 PM, Carl Witthoft wrote:
> I'd like a little advice as to when it's appropriate to create an
> R-package and submit it, as opposed to just providing the source to some
> simple code.
> In this case, I've written a function that draws a line plot (with
> options for points, etc) where the color of the line changes at
> specified values of the y-data (e.g., it's one color below -10, another
> color between -10 and -5, etc). It's pretty clean, and has a few
> error-checks, self-correctors, etc., so I would be happy to provide it
> to the community as a whole.
> So, is this worthy of a package, or should I just post the function code
> (well commented)?
> Or is this feature available deep inside some graphing package I haven't
> found yet? :-(
I'd say for a single function it's better to find an existing package
which would be a natural home for it.
Think about which package comes closest to doing what you want, and ask
the author of that package if they're interested in your contribution.
(This may need some iteration if the first author you contact says no.)
The disadvantage of putting this in its own package is the same as just
posting code somewhere -- it won't be found.
One other thing you should do regardless of how you end up distributing
it is putting a sample plot into the R Graph Gallery at
http://addictedtor.free.fr/graphiques/.
More information about the R-help
mailing list