Dear all, Consider this plot
 
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, 
       data = iris, allow.multiple=T,  outer=F,
       panel = function(x,y,...) { 
            panel.xyplot(x,y,...)
       } 
) 

I want to *add* some things to each panel and what I want to add involves using 
the data for each panel, so I try to take this subset of data out with 
subscripts:
 
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species, 
       data = iris, allow.multiple=T, outer=F,  
       panel = function(x,y,subscripts,...) { 
            panel.xyplot(x,y,...)
            subiris <- iris[subscripts,] # Something using this ...
       } 
) 
 
and then I get 
Error in NextMethod("[") : argument "subscripts" is missing, with no default

Does anyone know how to obtain this??
 
By the way: The doc on xyplot says:  "The value of subscripts becomes slightly 
more complicated when allow.multiple is in effect. Details can be found in the 
source code of the function latticeParseFormula.". Sure.
 
Best regards
Søren

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to