Hi,

When using splom() in the lattice package, I would like to be able to access the row and column number of each individual pairs plot , similar to the way that current.row() and current.column() can be used in other lattice plotting functions such as xyplot. For example, I would like to be able to write something along the lines of

library(mvtnorm)
library(lattice)
y <- rmvnorm(100,c(0,0,0),diag(3))
splom(y,panel=function(x,y,...){
        # I would like to access the panel row i and column j here, e.g.,
        # print(i,j)
        panel.splom(x,y,...)
        })

but I haven't been able to find a way to do this; current.row() and current.column() only vary at the level of splom's superpanel function.

Does anyone have a suggestion on how to access this information? I have looked into tweaking panel.pairs() to pass the i,j row,column information into the splom panel function, but it is not trivial because panel.pairs() calls several lattice-internal functions which are not exported. So if there is a better way, I would be grateful to know!

Many thanks,

Roger
--

Roger Levy                      Email: rl...@ling.ucsd.edu
Assistant Professor             Phone: 858-534-7219
Department of Linguistics       Fax:   858-534-4789
UC San Diego                    Web:   http://ling.ucsd.edu/~rlevy

______________________________________________
R-help@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.

Reply via email to