Re: [R] Creating a minimal package

From: Berton Gunter <gunter.berton_at_gene.com>
Date: Tue 13 Jul 2004 - 03:31:39 EST

Folks:

Without entering the debate, just a little addendum to Andy's suggestions and Duncan's and Gabor's comments about the difficulty of building (simple, containing no binaries and just a few functions) packages for R.

I have for some time now built such R-code only .rda files. It is a trivial matter to automatically attach them at startup (through .Rprofile, .First, or other startup options) so that they are then "transparently" available for use. I have also found it to be a simple matter to bundle such customized bunches of functions for "naive" users into a little UI so that they click on a desktop icon and R opens with the necessary functions and data (and maybe even prompts them, etc.). You could get quite fancy with this with TK-type stuff, but I haven't found it necessary to do this.

Please note: I know this is only for small stuff, risks clashes because the function names are global variables, is not for general distribution, etc. However, in the "Pareto Principle" spirit or doing things simply when that suffices, I have found such quick and dirty approaches quite useful. Why bang your head on a wall if you don't need to?

Cheers,
Bert

"Liaw, Andy" wrote:

> BTW, for functions/objects that you would like to use over and over, but do
> not want to go through the hurdle of packaging, there's a fairly simple way
> to achieve similar effect: save all of them in a .rda file, and when you
> need them, just attach() the .rda file.
>
> Andy
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--

ink1">ink1">Bert Gunter

Non-Clinical Biostatistics
Genentech
ink1">ink1">MS: 240B
ink1">Phone: 650-467-7374


"The business of the statistician is to catalyze the scientific learning
process."

ink2"> -- George E.P. Box

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jul 13 03:54:05 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:51 EST