hclustgeo_disc | R Documentation |
hierarchical clustering with spatial soft constraints
hclustgeo_disc(
data,
n,
alpha = 0.5,
D1 = NULL,
hclustm = "ward.D2",
scale = TRUE,
wt = NULL,
...
)
data |
An |
n |
The number of hierarchical clustering classes, which can be a numeric value or vector. |
alpha |
(optional) A positive value between |
D1 |
(optional) A |
hclustm |
(optional) The agglomeration method to be used, default is |
scale |
(optional) Whether to scaled the dissimilarities matrix, default is |
wt |
(optional) Vector with the weights of the observations. By default, |
... |
(optional) Other arguments passed to |
The grouped membership: a vector
if n
is a scalar, a matrix
(columns correspond to elements
of n
) if not.
This is a C++
enhanced implementation of the hclustgeo
function in ClustGeo
package.
gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
gzma$group = hclustgeo_disc(gzma,5,alpha = 0.75)
plot(gzma["group"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.