Learn R Programming

rgeoda (version 0.0.6)

min_distthreshold: 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(geoda_obj, is_arc = FALSE, is_mile = TRUE)

Arguments

geoda_obj

An object of [geoda] class

is_arc

(optional) FALSE (default) or TRUE, compute arc distance between two observations

is_mile

(optional) TRUE (default) or FALSE, convert distance unit from mile to km.

Value

A numeric value of minimum threshold of distance

Examples

Run this code
# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
dist_thres <- min_distthreshold(guerry)
dist_thres
# }

Run the code above in your browser using DataLab