cutreeDynamic(
dendro, cutHeight = NULL, minClusterSize = 20, # Basic tree cut options
method = "hybrid", distM = NULL,
deepSplit = (ifelse(method=="hybrid", 1, FALSE)),
# Advanced options
maxCoreScatter = NULL, minGap = NULL,
maxAbsCoreScatter = NULL, minAbsGap = NULL,
minSplitHeight = NULL, minAbsSplitHeight = NULL,
# External (user-supplied) measure of branch split
externalBranchSplitFnc = NULL, minExternalSplit = NULL,
externalSplitOptions = list(),
externalSplitFncNeedsDistance = NULL,
assumeSimpleExternalSpecification = TRUE,
# PAM stage options
pamStage = TRUE, pamRespectsDendro = TRUE,
useMedoids = FALSE, maxDistToLabel = NULL,
maxPamDist = cutHeight,
respectSmallClusters = TRUE,
# Various options
verbose = 2, indent = 0)
hclust
.method=="tree"
it
defaults to 0.99. For method=="hybrid"
it defaults to 99% of the range between the 5th
percentile and the maximum of the joining heights on the dendrogram.hclust
. If not
given and method == "hybrid"
, the function will issue a warning and default to method =
"tree"
.TRUE
), the more and smalcutHeight
relative to the 5th percentile of joining heights. See Details.cutHeight
and the 5th
percentile of joining heights.maxCoreScatter
.minGap
.cutHeight
and the 5th percentile of joining heights. Branches merging below this height will
automatically be merged. Defaults to zero but is used only if minAbsSplitH
minSplitHeight
above.assumeSimpleExternalSpecification
below for how to specify a single function).
Each functiexternalBranchSplitFnc
above.
Only used for method "hybrid".externalBranchSplitFnc
. If only one
external function is specified in externalBranchSplitFnc
above, externalSplitOptions
can be a named
list of arguments or a list with one component thNULL
or a logical vector with
one element per branch split function that specifies whether the corresponding braminExternalSplit
above is a scalar (has
length 1), should the function assume a simple specification of externalBranchSplitFnc
and
externalSplitOptions
? If TRUE
, externalBranchSplitFn
TRUE
, the PAM stage will
respect the dendrogram in the sense that objects and small clusters will only be assigned to clusters
that belong to the same branch that the objects or small clusters being labelUnlabeled==TRUE
.
If TRUE, the second stage will be use object to medoid distance; if FALSE, it
will use average object to cluster distance. The default (FALSE) is recommended.maxPamDist
instead. Only used for method "hybrid" and only if
labelUnlabeled==TRUE
.
Maximum object distance to closest cluster that will result in the object
assigned to that cluster.labelUnlabeled==TRUE
.
Maximum object distance to closest cluster that will result in the object
assigned to that cluster. Defaults to cutHeight
.labelUnlabeled==TRUE
.
If TRUE, branches that failed to be clusters in stage 1 only because of
insufficient size will be assigned together in stage 2. If FALSE, all objects will be assigned
individuallverbose
above). Each unit
adds two spaces before printed messages; useful when several functions' output is to be nested.In order to make the shape parameters maxCoreScatter
and minGap
more universal, their
values are interpreted relative to cutHeight
and the 5th percetile of the merging heights (we
arbitrarily chose the 5th percetile rather than the minimum for reasons of stability). Thus, the absolute
maximum allowable core scatter is calculated as maxCoreScatter * (cutHeight - refHeight) +
refHeight
and the absolute minimum allowable gap as minGap * (cutHeight - refHeight)
, where
refHeight
is the 5th percentile of the merging heights.
hclust
, cutreeHybrid
, cutreeDynamicTree
.