69 R: Statistical Software

{#sec:r}

r-base ess

There is an excellent selection of very high quality statistical software available for Debian GNU/Linux. A favourite is R, an open source version of S/SPlus, widely used in the academic statistical community.

The R packages from CRAN (the Comprehensive R Archive Network) are packaged in quite a collection for Debian (but not all are included yet), and you may want to pick and choose, or just install the whole lot:

  $ wajig install `wajig listnames ^r-`

See the for examples of using R.

R itself also has a package management facility and you can install packages directly from CRAN:

  > install.packages('ellipse')

The package will be downloaded and installed into /usr/local/lib/R/site-library. This can live comfortably with the Debian installed packages which live in /usr/lib/R/site-library. The only problem is that a package for Debian may come out and you will end up having duplication.

Emacs, provided by the emacs21 package, with the additional ess package, provides an excellent interface for working with R. To get started within emacs, simply issue the command M-x R $<$enter$>$. This will ask for a starting data directory which defaults to the current working directory (if you simply press $<$enter$>$ again). Alternatively, load in a file with a .R extension and the R mode will be loaded. You will have a collection of convenient R buttons added to your button bar, as in Figure ??.

Emacs ESS mode for interacting with R. {#fig:emacs-ess-mode}



Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.