Roger Levy
2010-Jan-31 03:20 UTC
[R] accessing column and row numbers inside splom in lattice
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: rlevy at 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
Dieter Menne
2010-Jan-31 10:03 UTC
[R] accessing column and row numbers inside splom in lattice
Roger Levy-2 wrote:> > 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 , >I found this rather tricky, but Deepayan's http://markmail.org/message/mxbevsxc5orbweu6 might help. Dieter -- View this message in context: http://n4.nabble.com/accessing-column-and-row-numbers-inside-splom-in-lattice-tp1457822p1457948.html Sent from the R help mailing list archive at Nabble.com.
Apparently Analagous Threads
- Splom custom superpanels
- panel.pairs in splom
- Lattice: How to color the data points in splom() according to the panel they are plotted?
- How to put given values in lower triangle of splom-plot?
- splom, plotmath: how to add three lines of information with alignment?