min_distthreshold {rgeoda} | R Documentation |
Minimum Distance Threshold for Distance-based Weights
Description
Get minimum threshold of distance that makes sure each observation has at least one neighbor
Usage
min_distthreshold(sf_obj, is_arc = FALSE, is_mile = TRUE)
Arguments
sf_obj |
An sf (simple feature) object |
is_arc |
(optional) FALSE (default) or TRUE, compute arc distance between two observations |
is_mile |
(optional) TRUE (default) or FALSE, if 'is_arc' option is TRUE, then 'is_mile' will set distance unit to 'mile' or 'km'. |
Value
A numeric value of minimum threshold of distance
Examples
## Not run:
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
dist_thres <- min_distthreshold(guerry)
dist_thres
## End(Not run)
[Package rgeoda version 0.0.10-4 Index]