[R] subsetting key on qqmath
John Field
JohnField at ozemail.com.au
Fri Oct 9 05:11:09 CEST 2009
Dear R list,
The code below puts qq-plots for two of three groups on the one
plot. However the legend includes all three groups, ie the auto.key
ignores the subset instruction. Is there an easy way to get around
this, so that only those groups plotted are included in the legend?
y1<-rnorm(100); y2<-rnorm(100)+1; y3<-rnorm(100)+2; y<-c(y1,y2,y3)
fact=factor(c(rep(1,100),rep(2,100),rep(3,100)))
require(lattice)
qqmath(~y,groups=fact,auto.key=list(corner=c(0,1)),subset=fact!=2)
Many thanks,
John Field
=========================
John Field Consulting Pty Ltd
10 High Street, Burnside SA 5066 Australia
Phone 08 8332 5294 or 0409 097 586
Fax 08 8332 1229
Email JohnField at ozemail.com.au
-------------- next part --------------
Checked by AVG - www.avg.com
:33:00
More information about the R-help
mailing list