inverse_distance_weight {gdverse} | R Documentation |
calculate inverse distance weight
Description
Function for calculate inverse distance weight.
Usage
inverse_distance_weight(locx, locy, power = 1, is_arc = FALSE)
Arguments
locx |
The x axis location. |
locy |
The y axis location. |
power |
(optional) Default is 1. Set to 2 for gravity weights. |
is_arc |
(optional) FALSE (default) or TRUE, whether to compute arc distance. |
Details
The inverse distance weight formula is
w_{ij} = 1 / d_{ij}^\alpha
Value
A inverse distance weight matrices with class of matrix
.
Author(s)
Wenbo Lv lyu.geosocial@gmail.com
Examples
x = 1:10
y = 1:10
inverse_distance_weight(x,y)
inverse_distance_weight(x,y,is_arc = TRUE)
[Package gdverse version 1.0.0 Index]