coord.index | R Documentation |
Compute (x,y,z,cc) coordinates from linear pixel index.
coord.index(im, index)
im |
an image |
index |
a vector of indices |
a data.frame of coordinate values
Simon Barthelme
index.coord for the reverse operation
cind <- coord.index(boats,33)
#Returns (x,y,z,c) coordinates of the 33rd pixel in the array
cind
all.equal(boats[33],with(cind,at(boats,x,y,z,cc)))
all.equal(33,index.coord(boats,cind))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.