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? :-( thanks for all advice. Carl
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/.
Not a full function to do this, but one of the examples for the clipplot function in the TeachingDemos package shows one way to do something similar to what you describe. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org (801) 408-8111> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Carl Witthoft > Sent: Saturday, August 16, 2008 11:54 AM > To: r-help at r-project.org > Subject: [R] To package or not to package? > > 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? :-( > > thanks for all advice. > Carl > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >