|
|
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)
- Peter Rossi has wonderful resources to bootstrap software engineers into the R packaging system:
- Another reason to use packages, is that you can then use R-Forge, R's answer to the Google code project. Collaborative Software Development Using R-Forge, Stefan Theußl and Achim Zeileis, R Journal, 1(1), 2009 explains how to use R-Forge, step by step.
- Creating R Packages, Using CRAN, R-Forge, and local R Archive Networks and Subversion (SVN) Repositories covers packaging from the perspective of collaborative development, discussing how the packaging system relates to CRAN, etc.
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
|
|