[Rd] How to organized code in the R/ directory of a package?
David Scott
d.scott at auckland.ac.nz
Fri Dec 11 01:52:21 CET 2009
Tobias Verbeke wrote:
> Peng Yu wrote:
>> I'm making a package, Current, I put all R files in the R/ directory
>> in the package (without using subdirectory). This will become a
>> problem when there are many files in the directory. I'm wondering how
>> to use subdirectories in R/?
>
> The standard solution is (I would think) to organize the code
> such that functions belonging together are grouped in one file.
>
That is what I try to do. My rule is that functions which are documented
in the same .Rd file are also in the same .R file. Might be more
sensible for some packages than for others.
David
_________________________________________________________________
David Scott Department of Statistics
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: d.scott at auckland.ac.nz, Fax: +64 9 373 7018
Director of Consulting, Department of Statistics
More information about the R-devel
mailing list