[R] Required Packages etiquette

From: GiusVa <sigakernel_at_yahoo.com>
Date: Fri 22 Apr 2005 - 14:14:37 EST


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


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 22 14:17:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:22 EST