Skip to content

All against all correlation matrix with GGPLOT Facet

2 messages · Gundala Viswanath, John Kane

#
I have the following data:

v <- rnorm(13)
w <- rnorm(13)
x <- rnorm(13)
y <- rnorm(13)
z <- rnorm(13)


Using GGPLOT facet, what I want to do is to create a 5*5 matrix,
where each cells plot the correlation between
each pair of the above data. E.g. v-v,v-w; v-x,...,z-z


What's the way to do it?
Attached is the image.

GV.
#
No image.  The R-help list tends to strip out a lot of files. A pdf or txt usually gets through.  In any case I understand what you want this may do it.

library(ggplot2)
dat1  <-  data.frame( v = rnorm(13),
w = rnorm(13),
x = rnorm(13),
y = rnorm(13),
z = rnorm(13))
plotmatrix(dat1)

John Kane
Kingston ON Canada
____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!