HCA: Hierarchical Cluster Analysis method

HCAR Documentation

Hierarchical Cluster Analysis method

Description

Run the HCA method for clustering.

Usage

HCA(
  d,
  k = NULL,
  method = c("ward", "single"),
  engine = c("hclust", "agnes"),
  graph = FALSE,
  ...
)

Arguments

d

The dataset (matrix or data.frame).

k

The number of cluster. If NULL (the default), it is set to the largest drop in aggregation height.

method

Character string defining the clustering method.

engine

Which implementation builds the hierarchy: hclust (the default) or agnes. They give the same hierarchy – same heights, to machine precision, and the same cut – but hclust is far faster on a large dataset (0.3 s against 30 s on 3000 observations). Use "agnes" for the linkages it alone provides, or to compare the two.

graph

A logical indicating whether or not a graphic should be plotted (the aggregation heights used to choose k, when k is not given).

...

Other parameters.

Value

The cluster hierarchy (hca object).

See Also

hclust, agnes, treeplot, predict.hca

Examples

require (datasets)
data (iris)
HCA (iris [, -5], k = 3, method = "ward")

fdm2id documentation built on Aug. 28, 2026, 9:07 a.m.