FreeOpenSrc
Free and Open Source Software

Guests are welcome to view our materials. To subscribe, edit, view raw markup, etc., you'll need to register for an account. Accounts are free (and will always be free) - your involvement helps us directly and indirectly (by demonstrating that our work matters to our funders...) StartingPoints has more info.
FreeOpenSrc

R is Cool

R is an open-source "free software environment for statistical computing and graphics" (the FOSS answer to packages such as S, hence the name) which runs on most Unix platforms (including virtually any Linux distribution and MacOS X) and Windows.

Getting started

Download and install R on your favorite computer, and start experimenting with it. There's quite a bit of good contributed documentation, including several good tutorials, on the Manuals page.

Agile R: the packaging system

R's packaging system is the key to staying sane while writing your own R code. R follows agile software development practices such as keeping documentation and code together, and even using documentation as a potential source of executable unit tests. The packaging system provides gentle support to guide you towards those best practices.

Working with R packages (practice)

Why R's packaging systems works the way it does (theory)

  • While not specific to the packaging system, John Chambers Facets of R tells the story of how R evolved the way it did, and therefore why the packaging system is the way it is. The comparison to Java and C++ is very valuable. Note that perl's objects are also functional, although perl is not exclusively object-oriented, unlike R. Btw, that difference is a strength, not a weakness, of both languages. We need different languages for different tasks and different communities.
  • Richard Stallman explains that the 'free' in free software should be interpreted as the free in free speech, not free beer. That sort of freedom takes infrastructure. Collaborative Software Development Using R-Forge, Stefan Theußl and Achim Zeileis, R Journal, 1(1), 2009 (mentioned above) does a nice job explaining the role resources like R-Forge play in the lives of collaborative software communities.
  • Literate programming refers to the practice of not just keeping documentation and code together, but exploiting that fact in various ways. R's packaging system does so to ensure, for example, that documentation is complete and is consistent with the corresponding code. Python and Perl offer modules (nose and Test::Inline, respectively, that take the process a step further and create tests from code samples in documentation.) See Literate programming for creating and maintaining packages, by Jonathan Rougier, R News, 5(1):35-39, May 2005 for the origins of literate programming in R. The current R CMD check offers much richer literate programming, as discussed in the materials in the previous section.

Extending R with C/C++/Fortran/Python

R has its own native programming interface. For more extensive uses, it can be can be programmed in a variety of languages, but my preference is PyThon (and I think you'll understand why, as we progress...), using RPy. You may want to install RPy and start playing with it. You could use C++ to program R, but I don't recommend it...

Datasets

To play with R, you'll need the datasets package, which is part of the core, but can be a bit hard to find for a beginner, so here's a direct link to the documentation: http://stat.ethz.ch/R-manual/R-patched/library/datasets/html/00Index.html

R Resources

r11 - 27 May 2009 - 18:47:12 - HilaryHolz
Guests are welcome to view our materials. To subscribe, edit, view raw markup, etc., you'll need to register for an account. Accounts are free (and will always be free) - your involvement helps us directly and indirectly (by demonstrating that our work matters to our funders...) StartingPoints has more info.
This site is powered by the TWiki collaboration platformCopyright 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Ahatwiki? Send feedback Syndicate this site RSSATOM