Re: [R] Ordering variables in a parallel coordinates plot
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.gal...@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@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@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.
Re: [R] Ordering variables in a parallel coordinates plot
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. Thanks, Tal Contact Details:--- Contact me: tal.gal...@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 cbe...@tajo.ucsd.eduwrote: 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.gal...@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@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Ordering variables in a parallel coordinates plot
Hi Charles, You're solution is great (and is actually what my professor suggested me to do today). In the meantime I searched even more and found this article: http://davis.wpi.edu/~xmdv/docs/tr0313_osf.pdf That gives a good description of the problem and of his attempts at solving it. I started by implementing (in a very rough way) the solution of all possible combinations, but it is not relevant for more then 7 dimensions. His solution will involve a mix of your solution with a local optimum, but I don't think I will go more into solving it anytime soon (but instead, make due with your solution). Thanks again, Tal Contact Details:--- Contact me: tal.gal...@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 10:05 PM, Charles C. Berry cbe...@tajo.ucsd.eduwrote: 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.gal...@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 cbe...@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.gal...@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@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 [[alternative HTML version deleted]] __ R-help@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 [[alternative HTML version deleted]] __ R-help@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.
Re: [R] 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.gal...@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 cbe...@tajo.ucsd.eduwrote: 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.gal...@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@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 [[alternative HTML version deleted]] __ R-help@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:cbe...@tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@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.
Re: [R] Ordering variables in a parallel coordinates plot
Hi, Tal, Tal Galili wrote: 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. So is your question answered? Or what exactly is the problem using the example below? library(lattice) parallel(~iris[1:4] | Species, iris) # if I understand you, this is easy parallel(~iris[c(3,2,1,4)] | Species, iris) # so I only can think you mean this... iris$SpeciesR = with(iris, factor(Species,levels= levels(Species)[c(3,1,2)])) parallel(~iris[1:4] | SpeciesR, iris) # .. but I am sure you know this already Dieter -- View this message in context: http://n4.nabble.com/Ordering-variables-in-a-parallel-coordinates-plot-tp997388p997909.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] Ordering variables in a parallel coordinates plot
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 ? Thanks, Tal Contact Details:--- Contact me: tal.gal...@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@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.