[R] control span in panel.loess in xyplot

Felix Andrews felix at nfrac.org
Fri Apr 30 01:26:13 CEST 2010


Within panel.superpose, the current group number is passed as
"group.number" to the "panel.groups" function.


On 29 April 2010 20:39, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> 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.
>>
>
> ______________________________________________
> 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.
>



-- 
Felix Andrews / 安福立
Postdoctoral Fellow
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 4670
E: felix.andrews at anu.edu.au
CRICOS Provider No. 00120C
-- 
http://www.neurofractal.org/felix/



More information about the R-help mailing list