[R] identify() - image()

Thomas Petzoldt thpe at hhbio.wasser.tu-dresden.de
Wed May 26 19:51:03 CEST 2004


javier garcia - CEBAS wrote:
> Hi all;
> Just to ask if you know about any available function in R to identify points 
> in a image plotted in X11. Something like the function identify(), but able 
> to extract (x,y,value) groups from the image.

Maybe, something like that?

z <- matrix(runif(100),10,10)
image(list(x = 0:9, y = 0:9, z = z))
p <- locator(1)
z[round(p$x), round(p$y)]

Thomas P.




More information about the R-help mailing list