Hi have a look at the latticeExtra package
library(latticeExtra) ? useOuterStrips or xyplot(y~x| paste(grouping1, grouping2), data=na.omit(mydata), layout = c(... HTH Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of peyman Sent: Saturday, 14 December 2013 03:43 To: r-help@r-project.org Subject: [R] data point labeling in xyplot Hi Folks, I have data with a format like: ID y param1 param2 groupingFactor1 groupingFactor2..... 1 ... 1 1 1 2 2 2 2 3 3 3 so several grouping factors and repeated measures. I am using trellis and xyplot to get plot with several grouping factors. something like xyplot(y~x|grouping1*grouping2, data=na.omit(mydata), panel=function{panel.xyplot(x,y);....}); Lets say x is the x axis parameter and y the one for y. So this will produce a plot with 4 windows which groups data according to all combinations of groupingFactor1 and groupingFactor2. Now I want to label the data points in each of these four plot windows with the "ID" (ID is an integer representing the subject number). I used the ltext(x=x,y=y,...), but then it uses the superscripts for the all data set and dose not mark the data correctly. It only works if I ignore the grouping and have all my data in one single plot window. It seems that I should somehow pass the correct subscripts for the data in each plot window (or group), but I could not figure it out. thanks, ______________________________________________ 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. ______________________________________________ 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.