cleanUp_partition: Remove small clusters (i.e. unclassified observations for...

Description Usage Arguments Value Examples

View source: R/cleanUp_partition.R

Description

Remove small clusters (i.e. unclassified observations for which no consensus was obtained)

Usage

1
2
3
4
5
6
cleanUp_partition(
  partition,
  min.cluster.size = 10,
  level.order = NULL,
  Unclassified = c(NA, "Unclassified")
)

Arguments

partition

the partition to clean (vector).

min.cluster.size

Minimum cluster size (i.e., smaller clusters will be discarded)

level.order

optional. If you supply a variable the cluster levels will be ordinated according to the mean values for the variable

Unclassified

string for the label of the unclassified observations. defaults value is NA.

Value

The cleaned up partition (factor).

Examples

1
2
3
part <- factor(kmeans(iris[, 1:4], 8)$cluster)
summary(part)
part.clean <- cleanUp_partition(part, Unclassified = "Unclassified")

LilithF/doMIsaul documentation built on Dec. 17, 2021, 12:08 a.m.