[R] Required Packages etiquette

GiusVa sigakernel at yahoo.com
Fri Apr 22 06:14:37 CEST 2005


Dear friends,

I am writing a package that I think may be of interest to many people so I
am in the process to build-check-write-thedocumentation for it. 

I have some questions regarding the "rules"  that a package
should abide in order to be consistent with the other packages on CRAN.
I have read and reread the Writing R extension manual and googled the
mailing list and I have found answers to many questions, but some have
been left unanswered. Sorry if they may seem trivial, but I have
joined the R community only 4 months ago and I still I do not have a
feeling of what is the right course of action.

Questions:

1) the package I am writing ( MYPKG throughout the rest of the message)
makes use of many packages. Some of them are fundamental to MYPKG and
are pervasive, i.e. without them the package will not work and many
functions are used. For these class of packages I (think) know what to
do.

The second class of package interests MYPKG only for specific
task. For example, I need the "coda" package if one wants to use a
specific function of MYPKG that produces a MCMC chain. What is the
best way to require the package? Inside the function that request it?

The relation between the  third class of packages and MYPKG is very
tricky. For example, from the MASS package MYPKG only uses "ginv" to
get the generalized inverse. "ginv" is an important function, i.e. it
is used in many functions. Do I have to require MASS? Or should I just
include only "ginv" in the package?

Thank you for patience.

Giuseppe

------------------------------------------------------------
|Giuseppe Ragusa
|University of California, San Diego
|9500 Gilman Dr. 0508
|La Jolla, CA 92093




More information about the R-help mailing list