Ordering variables in a parallel coordinates plot
On Sun, 3 Jan 2010, Tal Galili wrote:
Hi Charles, Thanks for answering - you are right about the posting guide (sorry). In any case, my question wasn't on how to reorder the columns (that is simple), but on how to choose what order to put them in.
OK, and I see you included a reference, so there is probably more to this than meets my eye. But would something as simple as this be good enough??
library(MASS) hc1 <- hclust(dist(cor(log(iris[, 1:4])))) parcoord(log(ir)[, hc1$order ], col = 1 + (0:149)%/%50)
or possibly hc1 <- hclust(dist( abs( cor(log(iris[, 1:4]))))) Chuck
Thanks, Tal ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili at gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) ---------------------------------------------------------------------------------------------- On Sun, Jan 3, 2010 at 7:05 PM, Charles C. Berry <cberry at tajo.ucsd.edu>wrote:
On Sat, 2 Jan 2010, Tal Galili wrote: Hello all,
I am searching for a way in R to re-order variables before presenting them in a parallel coordinates plot. So far I didn't find anything within a R related context on how to do this. I did find some texts talking about how it should be done in general, here is such example: http://tinyurl.com/ycnsjpe Is there a package or an example of the variable ordering (for parallel coordinate plot) in R ?
Follow the posting guide
??parallel
library(MASS)
?parcoord
example( parcoord )
See the last line of the example.
HTH,
Chuck
Thanks,
Tal
----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com/ (English)
----------------------------------------------------------------------------------------------
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Charles C. Berry (858) 534-2098
Dept of Family/Preventive
Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901