[R] Using interactive plots to get information about data points
Michael Bibo
michael_bibo at health.qld.gov.au
Sat Aug 23 10:48:47 CEST 2008
jcarmichael <jcarmichael314 <at> gmail.com> writes:
>
>
> I have been experimenting with interactive packages such iplots and playwith.
> Consider the following sample dataset:
>
> A B C D
> 1 5 5 9
> 3 2 8 4
> 1 7 3 0
> 7 2 2 6
>
> Let's say I make a plot of variable A. I would like to be able to click on
> a data point (e.g. 3) and have a pop-up window tell me the corresponding
> value for variable D (e.g. 4).
?identify with labels argument.
Another approach you might like to consider is to use GGobi (www.ggobi.org) with
the rggobi package linking directly to it from R. GGobi is built specifically
for this kind of interactive purpose.
> I am also trying to produce multiple small
> plots. For example, four side-by-side boxplots for each of the four
> variables A, B, C, D.
?par... eg par(mfrow=c(1,4)) (for base graphics).
Hope this helps.
Michael Bibo
Queensland Health
More information about the R-help
mailing list