[R] xyplot problem

From: Marc Bernard <bernarduse1_at_yahoo.fr>
Date: Fri 16 Jun 2006 - 01:14:45 EST


Dear all,    

  I have created the following data (that you can run) in order to explain my problem:    

  y <- rep(c(1,2), 8)

  id <- rep(1:8,each=2)
x1 <- rep(c("-a","+a"), each = 8)
x2 <- rep(c("-b","+b"), each = 2, times = 4)
x3 <- rep(c("-c", "+c"), each = 4,2)

df <- data.frame(cbind(id,y,x1,x2,x3))    

  If I do:    

  xyplot(y~ x3|x1*x2,data=df,groups=id,type = "b")    

  then my id's are joined by lines which is what I want. However when I wanted to add an horizontal line for each panel by using "panel.abline" the lines disapears, i.e.    

  xyplot(y~ x3|x1*x2,data=df,groups=id,type = "b",panel=function(x,y) {
panel.xyplot(x,y)
panel.abline(h=1.5)
}
)        

  I would be grateful if someone can tell me how can I correct the second statement in order to have horizontal lines for each panel and each id are joined by lines.    

  Thank you,    

  Bernard,        


        [[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 Received on Fri Jun 16 02:37:31 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 16 Jun 2006 - 04:12:58 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.