[R] control span in panel.loess in xyplot
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Apr 29 12:39:37 CEST 2010
See ?panel.number for lattice functions that can be used in your panel
function to discover which one is currently being drawn.
On Thu, Apr 29, 2010 at 6:28 AM, Santosh <santosh2005 at gmail.com> wrote:
> Dear R gurus..
>
> Is it possible to control span settings for different values of a grouping
> variable, when using xyplot? an example code shown below
> d=data.frame(x=rep(sample(1:5,rep=F),10),y=rnorm(50),z=rep(sample(LETTERS[1:2],rep=F),25))
> xyplot(y~x,data=d,groups=z,panel=panel.superpose,panel.groups=panel.loess(span=c(2/3,
> 3/4,1/2))
> or something like..
> xyplot(y~x,data=d,groups=z,panel=function(...)
> {panel.superpose(...);panel.groups=panel.loess(span=3/4,...)})
>
> Thanks,
> Santosh
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list