Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-14 Thread Duncan Mackay
pe = "smooth", col = "green") } ) Regards Duncan 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 [mailto:r-help-boun...@r-project.org] On

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-14 Thread Bert Gunter
Juan: What I gave you previously was correct, but not "nice". The subscripts = TRUE argument should have been in the xyplot() call, not the pnl function. However, it is actually not explicitly needed there either, because it will default to TRUE if the panel function has a subscripts argument, whi

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-13 Thread Juan Perez via R-help
Thanks Bert I am not sure what you meant by reading though. I managed to sort this out, although ideally would exist a better solution. I have created a column in my dataset, and given two codes depending whether older or younger than 40. Afterwards I have applied xyplot(MOE~Age|Species, groups=O

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-12 Thread Bert Gunter
Try reading ?panel.loess. There is no "subset" argument, so it is of course ignored. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Aug 12, 201

[R] Adding loess lines subsetting to each panel in lattice plot

2016-08-12 Thread Juan Perez via R-help
Hello, I've created an xyplot and I want to add a loess line for x (Age)  <=40 and another for values >40. In a way it is similar to this https://stat.ethz.ch/pipermail/r-help/2009-May/390502.html but still not succcessful. This is my try: xyplot(MOE~Age|Species, groups=Site,    panel = fu