decode {clickableImageMap}R Documentation

decode

Description

map the screen coordinates to a cell of a matrix

Usage

decode(y, cal, rcnames)

Arguments

y

parsed return value of grid.locator()

cal

return value of calibrate()

rcnames

Boolean if TRUE matrix has row names and col names

Value

returns an integer vector of the index of a cell in a matrix or returns -1 if rcnames is TRUE and vector y is not within valid range

Examples

if(interactive()){
load("data/x_y.RData")
load("data/x_rcnames.RData")
load("data/x_cal2.RData")
decode(x_y,x_cal2,x_rcnames)
}


[Package clickableImageMap version 1.0 Index]