powered by
Remove small clusters (i.e. unclassified observations for which no consensus was obtained)
cleanUp_partition( partition, min.cluster.size = 10, level.order = NULL, Unclassified = c(NA, "Unclassified") )
the partition to clean (vector).
Minimum cluster size (i.e., smaller clusters will be discarded)
optional. If you supply a variable the cluster levels will be ordinated according to the mean values for the variable
string for the label of the unclassified observations. defaults value is NA.
NA
The cleaned up partition (factor).
# NOT RUN { part <- factor(kmeans(iris[, 1:4], 8)$cluster) summary(part) part.clean <- cleanUp_partition(part, Unclassified = "Unclassified") # }
Run the code above in your browser using DataLab