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 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.. kindly help me... thanks a lot.... with regards, eric Deepayan Sarkar <[EMAIL PROTECTED]> wrote: On 11/21/05, peter eric wrote: > hi all, > I have a matrix and named each row and column as like below... > > a<-matrix(c(seq(3,45,3),seq(10,6,-1)),4,5,byrow=F) > > col<-c("peter","david","richrd","vincent","selva") > > rows<-c("julius","caeser","anja","maya") > > dimnames(a)<-list(rows,col) > > a > peter david richrd vincent selva > julius 3 15 27 39 9 > caeser 6 18 30 42 8 > anja 9 21 33 45 7 > maya 12 24 36 10 6 > > How I can plot this in graphs like julius Vs peter and so on.. > > whether it could ne done with image function?..
Sure, how about image(a) If you want the axes to be labelled appropriately, it might be easier with library(lattice) levelplot(a) or perhaps levelplot(a, scales = list(x = list(rot = 90))) -Deepayan __________________________________________________ [[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