
Robert I. Kabacoff - R in action
.pdf


Summary |
399 |
16.4.5rggobi
For our final example of interactivity, we’ll actually look beyond the R platform to the open source GGobi application (www.ggobi.org). GGobi is a comprehensive program for the visual and dynamic exploration of high-dimensional data and is freely available for Windows, Mac OS X, and Linux platforms. It offers a number of attractive features, including linked interactive scatter plots, bar charts, parallel coordinate plots, time series plots, scatter plot matrices, and 3D rotation; brushing and identification; multivariate transformation methods; and sophisticated exploratory support, including guided and manual 1D and 2D tours. Happily, the rggobi package provides a seamless interface between GGobi and R.
The first step in using GGobi is to download and install the appropriate software for your platform (www.ggobi.org/downloads/). Then install the rggobi package within R using install.packages("rggobi", depend=TRUE).
Once you’ve installed both, you can use the ggobi() function to run GGobi from within R. This gives you sophisticated interactive graphics access to all of your R data. To see this in action, execute the following code:
library(rggobi)
g <- ggobi(mtcars)
The GGobi interface will open and allow you to explore the mtcars dataset in a highly interactive fashion. To learn more, review the introduction, tutorial, manual, and video guides available on the GGobi website. A comprehensive overview is also provided in Cook and Swayne (2008).
16.5 Summary
In this chapter, we reviewed several packages that provide access to advanced graphical methods. We started with the lattice package, designed to provide a system for creating trellis graphs, followed by the ggplot2 package, based on a comprehensive grammar of graphics. Both packages are designed to provide you with a complete and comprehensive alternative to the native graphics provided with R. Each offers methods of creating attractive and meaningful visualizations of data that are difficult to generate in other ways.
We then explored several packages for dynamically interacting with graphs, including playwith, latticist, iplots, and rggobi. These packages allow you to interact directly with data in graphs, leading to a greater intimacy with your data and expanded opportunities for developing insights.
You should now have a firm grasp of the many ways that R allows you to create visual representations of data. If a picture is worth a thousand words, and R provides a thousand ways to create a picture, then R must be worth a million words (or something to that effect). These resources are a testament to the hard and selfless work of the initial R development team and the thousands of hours of work contributed by package authors.


AFTERWORD Into the rabbit hole |
401 |
CRANberries (http://dirk.eddelbuettel.com/cranberries/)
A site that aggregates information about new and updated packages, and contains links to CRAN for each.
R Graph Gallery (http://addictedtor.free.fr/graphiques/)
A collection of innovative graphs, along with their source code.
R Graphics Manual (http://bm2.genes.nig.ac.jp/)
A collection of R graphics from all R packages, arranged by topic, package, and function. At last count, there were 35,000+ images!
Journal of Statistical Software (http://www.jstatsoft.org/)
A freely accessible refereed journal containing articles, book reviews, and code snippets on statistical computing. Contains frequent articles about R.
Revolutions (http://blog.revolution-computing.com/)
A popular, well-organized blog, dedicated to news and information about R.
CRAN Task Views (http://cran.r-project.org/web/views/)
Task views are guides to the use of R in different academic and research fields. They include a description of the packages and methods available for a given area. Currently there are 28 task views available (see table below).
CRAN Task Views
Bayesian Inference |
Machine Learning & Statistical Learning |
Chemometrics and Computational Physics |
Medical Image Analysis |
Design, Monitoring, and Analysis of Clinical Trials |
Multivariate Statistics |
Clinical Trial Design, Monitoring, and Analysis |
Natural Language Processing |
Cluster Analysis & Finite Mixture Models |
Official Statistics & Sur vey Methodology |
Probability Distributions |
Optimization and Mathematical Programming |
Computational Econometrics |
Analysis of Pharmacokinetic Data |
Analysis of Ecological and Environmental Data |
Phylogenetics, Especially Comparative Methods |
Design of Experiments (DoE) |
Psychometric Models and Methods |
Empirical Finance |
Robust Statistical Methods |
Statistical Genetics |
Statistics for the Social Sciences |
Graphic Displays & Dynamic Graphics |
Analysis of Spatial Data |
gRaphical Models in R |
Sur vival Analysis |
High-Per formance and Parallel Computing with R |
Time Series Analysis |
|
|
402 AFTERWORD Into the rabbit hole
R-Help Main R Mailing List (https://stat.ethz.ch/mailman/listinfo/r-help)
This electronic mailing list is the best place to ask questions about R. The archives are also searchable. Be sure to read the FAQ before posting questions.
Quick-R (http://www.statmethods.net)
This is my R website. It’s stocked with more than 80 brief tutorials on R topics. False modesty forbids me from saying more.
The R community is a helpful, vibrant, and exciting lot. Welcome to Wonderland.


404 |
APPENDIX A Graphic user interfaces |
Table A.1 Integrated development environments and syntax editors (continued )
Name |
URL |
|
|
RStudio |
http://www.rstudio.org |
Tinn-R (Windows only) |
http://www.sciviews.org/Tinn-R/ |
Notepad++ with NppToR |
http://notepad-plus-plus.org/ |
(windows only) |
http://sourceforge.net/projects/npptor/ |
|
|
The code editors in table A.1 allow the user to edit and execute R code and include syntax highlighting, statement completion, object exploration, project organization, and online help. A screenshot of RStudio is provided in figure A.1.
Several promising full-blown GUIs for R are listed in table A.2. The GUIs available for R are less comprehensive and mature than those offered by SAS or IBM SPSS, but they’re developing rapidly.
Figure A.1 RStudio IDE

|
APPENDIX A Graphic user interfaces |
405 |
|
Table A.2 Comprehensive GUIs for R |
|
||
|
|
|
|
Name |
|
URL |
|
|
|
|
|
JGR/Deducer |
|
http://ifellows.ucsd.edu/pmwiki/pmwiki.php?n=Main.DeducerManual |
|
R AnalyticFlow |
|
http://www.ef-prime.com/products/ranalyticflow_en/ |
|
Rattle (for data mining) |
|
http://rattle.togaware.com/ |
|
R Commander |
|
http://socser v.mcmaster.ca/jfox/Misc/Rcmdr/ |
|
Red R |
|
http://www.red-r.org/ |
|
Rkward |
|
http://rkward.sourceforge.net/ |
|
|
|
|
|
My favorite GUI for introductory statistics courses is R Commander(shown in figure A.2). Finally, there are a number of applications that allow the user to create a GUI wrapper for any given R function (including user-written functions). These include the R GUI Generator (RGG) (http://rgg.r-forge.r-project.org/), and the fgui and
twiddler packages available from CRAN.
GUI projects in R are undergoing rapid change and expansion. For more information, visit the R GUI Projects page at http://www.sciviews.org/_rgui/.
Figure A.2
R Commander GUI