Dear R users, I am trying to have an xyplot of a data set which has the following variables: case (n=10,20,30) parameter (parm=a,b) group (grp=g1,g2) y (y values) x (x=2,4,8)
My plot should be parameter by case such that I have 2 rows (each row= each parameter) and 3 columns (each column=each case). My R-code is as follows but I am not able to get what I want to: tp1.sim <- xyplot(y~ x | case + parm , group=group, data = data, lty = 1:4 , pch = 1:4) print(tp1.sim) How can I have two lines (for g1 and g2) in each plot (each box)? How do I label the x-axis with only values 2, 4, 8? How do I label each column with the corresponding case number? My hypothetical data set is as follows: parm x case y group a 2 10 0.03 g1 b 2 10 0.02 g1 a 4 10 0.03 g1 b 4 10 0.02 g1 a 8 10 0.03 g1 b 8 10 0.02 g1 a 2 20 0.03 g1 b 2 20 0.02 g1 a 4 20 0.03 g1 b 4 20 0.02 g1 a 8 20 0.03 g1 b 8 20 0.02 g1 a 2 30 0.03 g1 b 2 30 0.02 g1 a 4 30 0.03 g1 b 4 30 0.02 g1 a 8 30 0.03 g1 b 8 30 0.02 g1 a 2 10 0.13 g2 b 2 10 0.12 g2 a 4 10 0.13 g2 b 4 10 0.12 g2 a 8 10 0.13 g2 b 8 10 0.12 g2 a 2 20 0.13 g2 b 2 20 0.12 g2 a 4 20 0.13 g2 b 4 20 0.12 g2 a 8 20 0.13 g2 b 8 20 0.12 g2 a 2 30 0.13 g2 b 2 30 0.12 g2 a 4 30 0.13 g2 b 4 30 0.12 g2 a 8 30 0.13 g2 b 8 30 0.12 g2 Many thanks in advance for your response. George [[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.