powered by
This function load grid floor and generate the distance matrix
spatial_dist(M, lon.lat = F, mile = F)
A data.frame contains grid coordinates
If TRUE, the function will use longitude and latitude for calculating geographic distance
If TRUE, the function will yeild distance in mileages. If FALSE, the function will yeild distance in kilometers
A matrix of distance matrix
# NOT RUN { spatial_dist(expand.grid(1:4, 1:4)) # }
Run the code above in your browser using DataLab