I'm trying to use distanceFromPoints function in raster
package as:
distanceFromPoints(object,xy,...)
Where, object is raster and xy
is matrix of x
and y
coordinates
Now, if my raster has, for example, 1000 cells and xy
represents one point, I get 1000 values representing distances between xy
and each raster cell. my problem is when xy
has multiple coordinates, e.g., 10 points. the function description indicates that xy
can be multiple points but when I run this function with multiple XY
points, I still get only 1000 values while I'm expecting 1000 values for each coordinate in XY
. How does this work?
Thanks!