R/weights.R
gda_distance_weights.Rd
Create a distance-based weights
gda_distance_weights(
geoda_obj,
dist_thres,
power = 1,
is_inverse = FALSE,
is_arc = FALSE,
is_mile = TRUE
)
An instance of geoda-class
A positive numeric value of distance threshold
(optional) The power (or exponent) of a number indicates how many times to use the number in a multiplication.
(optional) FALSE (default) or TRUE, apply inverse on distance value
(optional) FALSE (default) or TRUE, compute arc distance between two observations
(optional) TRUE (default) or FALSE, convert distance unit from mile to km.
An instance of Weight-class
if (FALSE) { # \dontrun{
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)
} # }