



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Rong Xia
Utah State University
Department of Mathematics and Statistics
3900 Old Main Hill
Logan, UT 84322–
Interactive Graphics for R
Introduction
Interactive features are the building blocks for a graphical data analysis. Although interactive statistical graphics plays a major role in a data analysis process, it usually needs to be complemented with classical statistical methods or other data mining tools. However, existing interactive tools either make quite few efforts or are too cumbersome in incorporating statistics methods into graphics.
iplots is a R library which brings interactive graphics into the R enviornments. It is de- veloped by Simon Urbanek and Tobias Wichtrey and its website is http://www.iplots. org. Using the R/SJave Interface, iplots offers a variety of customization options that can be modified and enhanced directly through the R interface. The current version of iplots offers scatterplot, histogram, barchart, box plots, mosaic plots, hammock plots, parallel coordinate plots and maps.
There is quite some similarity between iplots and Mondrian, such that many of the graphics from Mondrian can be created with iplots as well. However, the reader would need to learn the functions of the iplots packages as there is no simple point-and-click interface for creating plots as in Mondrian. ):.
Compared with GGobi, iplots is more flexible in communicating with R, while GGobi is better at displaying 2D tour. The point-and-click interface for brushing is quite similar between GGobi and iplots. Readers familiar with one package should have no difficulty in using others.
Function Reference
The second means of accessing individual plots without changing the current plot is to use the plot object returned by plot creating commands.
Example The primary goal of the study is to estimate the average housing rent prices in Munich taking into account the size, location and amenities of the dwelling.
We first look at the response variable “rent” over the “size” of the housing in a scatter- plot. To better interpret, we use differnet colors for different “number of rooms” in the
house, and overlay the regression line on the scatterplot. There seems to be a strong positive correlation of “rent” and “size”. See Figure 1 for details.
Figure 1: Scatterplot for the rent data
To further explore the data, we also highlight the observations with “rent> 855” and look at the barplot for the year of the house. We find out that both newly built and old houses tend to be more expensive, as displayed in Figure 2.
Figure 2: Histogram for Rent and Barplot for Years
banek: “iPlots: Interactive Graphics for R” (Theus & Urbanek (2004)), “Interactive Graphics for Data Analysis: Principles and Examples” (Theus & Urbanek (2008)) and the user manual for iplots package in R.
Links to Data Files and R-codes:
References
Theus, M. & Urbanek, S. (2004), ‘iplots : Iteractive Graphics for R’, Statistical Com- puting and Graphics 15 , 11–14.
Theus, M. & Urbanek, S. (2008), Interactive Graphics for Data Analysis : Principles and Examples, CRC Press, Boca Raton, FL.
http://www.iplots.org