View source: R/clickableImageMap.R
calibrate | R Documentation |
use coordinates of upper left and bottom right of matrix to construct mapping between viewport coordinates and matrix cells
calibrate(m, rows, pullDownRow)
m |
matrix |
rows |
list of row heights in the gtable object |
pullDownRow |
integer number of the target row in the gtable object |
returns a list whose components are matrices representing the upper and lower coordinates of the row and column cells
if(interactive()){
m<-matrix(1:20 * .05,nrow=2,ncol=10)
load("data/x_rows.RData")
pullDownRow<-which(names(x_rows)=="pullDownRow")
load("data/x_m.RData")
cal<-calibrate(x_m,x_rows,pullDownRow)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.