powered by
Function for calculate inverse distance weight.
inverse_distance_weight(locx, locy, power = 1, is_arc = FALSE)
A inverse distance weight matrices with class of matrix.
matrix
The x axis location.
The y axis location.
(optional) Default is 1. Set to 2 for gravity weights.
(optional) FALSE (default) or TRUE, whether to compute arc distance.
Wenbo Lv lyu.geosocial@gmail.com
The inverse distance weight formula is \(w_{ij} = 1 / d_{ij}^\alpha\)
x = 1:10 y = 1:10 inverse_distance_weight(x,y) inverse_distance_weight(x,y,is_arc = TRUE)
Run the code above in your browser using DataLab