suparna mitra
2009-Jun-10 14:05 UTC
[R] R: Best way to plot a Matrix of all possible pair combinations
Hallo R Users, Please help I have some distance matrix data like> M[1:10,][,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.8750000 0.5000000 0.5000000 0.3750000 0.6250000 0.00000000 [2,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 [3,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 [4,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 [5,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 [6,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 [7,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 [8,] 0.9497743 0.7605977 0.2394023 0.7103720 0.2896280 0.00000000 [9,] 0.0754717 0.7169811 0.0000000 0.3584906 0.9245283 0.28301887 [10,] 0.3870968 0.9354839 0.0000000 0.4516129 0.6129032 0.06451613 where all the columns (1 to 6) are representing all possible pair-wise combination from four datasets, like cmbn [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 1 1 2 2 3 [2,] 2 3 4 3 4 4 and all the rows represent different species so;> M[1,1][1] 0.875 ## is the distance value for species 1 for combination data pair 1& 2. Can any body please suggest me what will be the best way to represent these results in plot? Thanks a lot in advance, With best regard, Suparna [[alternative HTML version deleted]]
jim holtman
2009-Jun-11 01:23 UTC
[R] R: Best way to plot a Matrix of all possible pair combinations
try 'levelplot' in the lattice package. On Wed, Jun 10, 2009 at 10:05 AM, suparna mitra < suparna.mitra@googlemail.com> wrote:> Hallo R Users, > Please help > I have some distance matrix data like > > M[1:10,] > [,1] [,2] [,3] [,4] [,5] [,6] > [1,] 0.8750000 0.5000000 0.5000000 0.3750000 0.6250000 0.00000000 > [2,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 > [3,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 > [4,] 0.8928571 1.0000000 0.0000000 0.8928571 0.1071429 0.00000000 > [5,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 > [6,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 > [7,] 1.0000000 0.1304348 0.8695652 0.1304348 0.8695652 0.00000000 > [8,] 0.9497743 0.7605977 0.2394023 0.7103720 0.2896280 0.00000000 > [9,] 0.0754717 0.7169811 0.0000000 0.3584906 0.9245283 0.28301887 > [10,] 0.3870968 0.9354839 0.0000000 0.4516129 0.6129032 0.06451613 > > where all the columns (1 to 6) are representing all possible pair-wise > combination from four datasets, > like > cmbn > [,1] [,2] [,3] [,4] [,5] [,6] > [1,] 1 1 1 2 2 3 > [2,] 2 3 4 3 4 4 > > and all the rows represent different species > > so; > > M[1,1] > [1] 0.875 ## is the distance value for species 1 for combination data > pair 1& 2. > > Can any body please suggest me what will be the best way to represent these > results in plot? > Thanks a lot in advance, > With best regard, > Suparna > > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]]
Maybe Matching Threads
- Need some help in R : value more than equals to a row.
- Problem in 'Apply' function: does anybody have other solution
- Rplot save problem after using "identify" with R version 3.0.0
- Creating a symmetric contingency table from two vectors with different length of levels in R
- Error is assocplot