powered by
index.coord(im, coords, outside = "stop")
im <- as.cimg(function(x,y) x+y,100,100) px <- index.coord(im,data.frame(x=c(3,3),y=c(1,2))) im[px] #Values should be 3+1=4, 3+2=5
Run the code above in your browser using DataLab