Full spatially-constrained clustering.
scl_full(xy, dmat, ncl, linkage = "single", shortest = TRUE, nnbs = 6L)
Rectangular structure (matrix, data.frame, tibble), containing coordinates of points to be clustered.
Square structure (matrix, data.frame, tibble) containing
distances or equivalent metrics between all points in xy
. If xy
has n
rows, then dat
must have n
rows and n
columns.
Desired number of clusters. See description of `ncl_iterate` parameter for conditions under which actual number may be less than this value.
Either "single"
or "average"
. For covariance
clustering, use "single"
with `shortest = FALSE`.
If TRUE
, the dmat
is interpreted as distances
such that lower values are preferentially selected; if FALSE
, then
higher values of dmat
are interpreted to indicate stronger
relationships, as is the case for example with covariances.
Number of nearest neighbours to be used in calculating clustering
trees. Triangulation will be used if nnbs <= 0
.
Other clustering_fns:
scl_recluster()
,
scl_redcap()