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

From: David Scott <d.scott_at_auckland.ac.nz>
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


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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel 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