(For internally use and test only) Distance-based Spatial Weights
Create a distance-based weights
gda_distance_weights( geoda_obj, dist_thres, power = 1, is_inverse = FALSE, is_arc = FALSE, is_mile = TRUE )
geoda_obj
: An instance of geoda-classdist_thres
: A positive numeric value of distance thresholdpower
: (optional) The power (or exponent) of a number indicates how many times to use the number in a multiplication.is_inverse
: (optional) FALSE (default) or TRUE, apply inverse on distance valueis_arc
: (optional) FALSE (default) or TRUE, compute arc distance between two observationsis_mile
: (optional) TRUE (default) or FALSE, convert distance unit from mile to km.An instance of Weight-class
## Not run: guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda") guerry <- geoda_open(guerry_path) dist_thres <- gda_min_distthreshold(guerry) dist_w <- gda_distance_weights(guerry, dist_thres) summary(dist_w) ## End(Not run)
Useful links