dear deepayan & all... let me explain you my full problem clearly..so that you could clearly suggest me in right direction.... my matrix (a) looks like as below...I´ve done clusutering in this matrix ---------------------------------------------------------------- a<-matrix(c(seq(3,45,3),seq(10,6,-1)),4,5,byrow=F) col<-c("ra","rb","rc","rd","re") rows<-c("ca","cb","cc","cd") dimnames(a)<-list(rows,col) a ra rb rc rd re ca 3 15 27 39 9 cb 6 18 30 42 8 cc 9 21 33 45 7 cd 12 24 36 10 6 ----------------------------------------------------------- clustering based on row and columns..suppose after clustering my row & col clustes looks like this.. row cluster 1: ra,rb 2: rc,rd 3:re column cluster 1: ca,cb 2: cc,cd So my clustered matrix (should) looks like ROWS 1 2 3 I ra rb I rc rd I re ----------------I------------------I----------------------I------------------ ca I 3 15 I 27 39 I 9 1 I I I cb I 6 18 I 30 42 I 8 I I I COLUMNS---------------I-----------------------------------------I----------------- cc I 9 21 I 33 45 I 7 2 I I I cd I 12 24 I 36 10 I 6 ----------------I-----------------I-----------------------I-------------------- The above is the output matrix..It has to be plotted in graphs showing the partitions clearly as it is shown in the above matrix... . what kind of approach will be useful in gettign this..?particularly in colored graphs... thanks a lot... yours sincerely, eric.
Deepayan Sarkar <[EMAIL PROTECTED]> wrote: On 11/21/05, peter eric wrote: > > Really your (Mr.deepayan´s)answer is what I expected..thanks a lot...and I > like to ask you one more thing.. > Is it possible to do boolean operations in this matrix and plot that also > in graphs? > > for example > 1. a[anja,maya] Vs a[vincent,selva] > means things common between the rows anja&maya and columns vincent & > selva You mean levelplot(a[c("anja", "maya"), c("vincent", "selva")]) ? This is standard matrix indexing in R. > 2.a[anja,maya] Vs a[peter,david] > and so on... > > So in that case whether it is possible to plot in the same graph(since I´m > doing different...more than one.. comparisions) or I´ve to plot in a > multiple graph.. It depends on what you want to do. If the different comparisons are based on some systematic rule then levelplot may take you further. [Note that for this you may need to work with a data.frame instead of a matrix. E.g., mat2df <- function(x) { rx <- row(x) cx <- col(x) data.frame(row = rownames(x)[rx], column = colnames(x)[cx], z = as.vector(x)) } b <- mat2df(a) b is now a data frame: > b row column z 1 julius peter 3 2 caeser peter 6 3 anja peter 9 ... ] --------------------------------- [[alternative HTML version deleted]]
______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html