spdep_skater {sdsfun} | R Documentation |
spatial c(k)luster analysis by tree edge removal
Description
SKATER forms clusters by spatially partitioning data that has similar values for features of interest.
Usage
spdep_skater(sfj, k = 6, nb = NULL, ini = 5, ...)
Arguments
sfj |
An |
k |
(optional) The number of clusters. Default is |
nb |
(optional) A neighbours list with class nb. If the input |
ini |
(optional) The initial node in the minimal spanning tree. Defaul is |
... |
(optional) Other parameters passed to spdep::skater(). |
Value
A numeric vector of clusters.
Examples
library(sf)
gzma = read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
gzma_c = spdep_skater(gzma,8)
gzma$group = gzma_c
plot(gzma["group"])
[Package sdsfun version 0.4.1 Index]