[R] Big, complex, well-structured .R file for demonstration?

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Jun 12 14:51:21 CEST 2013

Just because you have an editor that can let you see the organization within the file does not mean the code itself is well-structured. If you do put a lot of code in one file, you will be more likely in your next project that builds on this one to load code you do not need (bloat), and that is a very practical defect in the structure of the current project. Regardless of any arguments you can think of to the contrary, that is why single large files with otherwise well-structured code are uncommon.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

Thorsten Jolitz <tjolitz at gmail.com> wrote:

>Greg Snow <538280 at gmail.com> writes:
>> Some would argue that "big" and "well structured" are not compatible.
> Part
>> of structuring a project well is knowing when and how to break it
>> smaller pieces, so those authors who are best at creating well
>structured R
>> code will often split it between several small files rather than one
>> file.
>As Emacs Org-mode has proven for text files, this structuring into
>smaller pieces can be done in one single file too (that is structured
>a hierarchical outline tree) an this can be even more convenient than
>deal with many small files. But otherwise I agree with you, its much
>better to split a file up before it becomes a growing mess.
>> On Tue, Jun 11, 2013 at 9:06 AM, Thorsten Jolitz <tjolitz at gmail.com>
>>> Hi List,
>>> I'm looking for a rather big, but well structured R file that
>>> as much of R language features as possible (i.e. that uses a lot of
>>> functionality described in the 'R Reference Card' and, if possible,
>>> classes too).
>>> I want to check some code I wrote against such a file and use it for
>>> demonstration purposes. However, most .R files I find out there are
>>> rather short without much structure.
>>> Any links to candidate (open source) files would be appreciated.
>>> --
>>> cheers,
>>> Thorsten
>>> ______________________________________________
>>> R-help at r-project.org 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.

More information about the R-help mailing list