local_clustering {spotoroo} | R Documentation |
Clustering hot spots spatially
Description
This function clusters hot spots spatially.
Usage
local_clustering(lon, lat, adjDist)
Arguments
lon |
Numeric. A vector of longitude values. |
lat |
Numeric. A vector of latitude values. |
adjDist |
Numeric (>0). Distance tolerance. Unit is metre. |
Details
For more details about the clustering algorithm and the argument adjDist
,
please check the documentation of hotspot_cluster()
.
This function performs the step 2 of the clustering algorithm. It
clusters hot spots in a given interval.
Value
Integer. A vector of membership labels.
Examples
# Define lon and lat for 10 observations
lon <- c(141.1, 141.14, 141.12, 141.14, 141.16, 141.12, 141.14,
141.16, 141.12, 141.14)
lat <- c(-37.10, -37.10, -37.12, -37.12, -37.12, -37.14, -37.14,
-37.14, -37.16, -37.16)
# Cluster 10 hot spots with different values of adjDist
local_clustering(lon, lat, 2000)
local_clustering(lon, lat, 3000)
local_clustering(lon, lat, 4000)
[Package spotoroo version 0.1.4 Index]