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]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html