Hello, I have a dataset consisting of four variables: species (factor, five levels), C3C4 (factor, two levels), and numeric variables PAR and LRU. I wish to produce a scatter plot of PAR vs LRU where (1) each species has a unique symbol and color (2) there is an overlaid loess line that is calculated for each C3C4 level. The following code produces a nice plot where each species has its own loess curve, but I'm struggling for the syntax to produce a single loess curve for all the points in each of the two plots:
xy <- xyplot(LRU~PAR|C3C4, data=light_data, groups=species, panel=panel.superpose, auto.key=TRUE, col.line=pal, par.settings=mytheme, panel.groups=function(x, y, ...){ panel.xyplot(x, y, ...) panel.loess(x, y, ...)}) Any help much appreciated. Thanks! Tim -- Timothy W. Hilton Assistant Project Scientist Sierra Nevada Research Institute University of California, Merced thil...@ucmerced.edu ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.