Hi, I've been driving myself insane with this problem. I have a trellis plot of contours, and I want each level to have something like "z=value" for each one. I can get each one to say z, or each one to say the value (by using as.factor) but not both. Heres an artificial example to show what I mean (as my actual data set is much larger!)
x<-c(1,2,3) y<-c(2,4,6) z<-c(0.1,0.5,2) combo<-expand.grid(x,y,z) combo<-data.frame(combo) names(combo)<-c("x","y","z") outcome<-function(l) { (l[1]*l[2])/l[3] } resp<-apply(combo,1,outcome) levelplot(resp~x*y|z,data=combo ,pretty=TRUE,region=TRUE,contour=FALSE) , so in this final graph I want the z=0.1, z=0.5 and z=2 in turn. Thanks, Kieran Martin University of Southampton [[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 and provide commented, minimal, self-contained, reproducible code.