R/get_distance.R
get_distance.Rd
Calculates an average distance between non-NA cells
get_distance(p, x)
A matrix
A SpatRaster with proper metadata (e.g., extent and CRS)
An average distance between points
It converts permuted matrix into a vector dataset, and calculates an average distance between the points