SKATER forms clusters by spatially partitioning data that has similar values for features of interest.
Arguments
- sfj
An
sf
object of observation data. Please ensure that the attribute columns are included in the SKATER analysis.- k
(optional) The number of clusters. Default is
6
.- nb
(optional) A neighbours list with class nb. If the input
nb
is NULL, it will be constructed automatically usingspdep_nb()
.- ini
(optional) The initial node in the minimal spanning tree. Defaul is
5
.- ...
(optional) Other parameters passed to spdep::skater().
Examples
gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
gzma_c = spdep_skater(gzma,8)
gzma$group = gzma_c
plot(gzma["group"])