Re: [Rd] How to organized code in the R/ directory of a package?

From: David Scott <>
Date: Fri, 11 Dec 2009 13:52:21 +1300

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 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:,  Fax: +64 9 373 7018

Director of Consulting, Department of Statistics mailing list Received on Fri 11 Dec 2009 - 00:59:38 GMT

This archive was generated by hypermail 2.2.0 : Sat 12 Dec 2009 - 19:11:08 GMT