Re: [R] R modules

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue 02 Jan 2007 - 18:37:02 GMT

On 1/2/2007 12:46 PM, Geoffrey Zhu wrote:
> Hi All,
>
> I'd like to know what is the best way to organize R code in multiple modules=
> and files. The R code we are writing is too much for a single file. Besides=
> , there are a lot of reusable functions we'd like to factor out. But writing=
> a package for that is quite an over-kill and might be too inflexible.
>
> So what is the best way to organize R code into multiple files and reusable=
> modules?

Write a package for it. It's not overkill, it's using the tools the way they were designed to be used.

Not all packages need to be submitted to CRAN, you can have a package for your own use. It gives you a way to organize your code and documentation, numerous code checking tools, namespaces, all sorts of good stuff.

Duncan Murdoch



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 and provide commented, minimal, self-contained, reproducible code. Received on Wed Jan 03 05:42:24 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 02 Jan 2007 - 19:31:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.