[R] Plot where points are treatment letter

Schatzi adele_thompson at cargill.com
Tue Feb 8 21:42:11 CET 2011


I would like to create a plot of y vs x with different treatments where the
points are actually the letter of the treatment. Here is the code: 

A<-as.matrix(rnorm(10,10)) 
B<-as.matrix(rnorm(10,9.5)) 
C<-as.matrix(rnorm(10,10.5)) 
Y<-as.matrix(rnorm(30,13)) 
X<-rbind(A,B,C) 
nA<-matrix("A",10,1) 
nB<-matrix("B",10,1) 
nC<-matrix("C",10,1) 
TRT<-rbind(nA,nB,nC) 

plot(X,Y) 
xyplot(Y~X,groups = TRT) 

The last plot colors the points by treatment, but it uses points, not the
letter for each treatment. Does anyone know how to do this? It seems simple
enough and I'm sure it is very easy, I just cannot figure it out nor have I
found the code. Thank you.  


-- 
View this message in context: http://r.789695.n4.nabble.com/Plot-where-points-are-treatment-letter-tp3276751p3276751.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list