Learn R Programming

SPARTAAS (version 1.2.7)

perioclust_subdivide: Subdivide a cluster after running perioclust.

Description

Allow the user to split one cluster into sub-clusters. This function only works with 'perioclust_cl' object returned by the perioclust function.

Usage

perioclust_subdivide(perioclust_cl,cluster,nb_class)

Value

see perioclust

Arguments

perioclust_cl

A perioclust_cl object

cluster

The number of the cluster. Numbered from left to right on the dendrogram (1, 2, ...)

nb_class

The number of sub-clusters you want

Author

A. COULON

L. BELLANGER

P. HUSI

Examples

Run this code
data(datangkor)

#network stratigraphic data (Network)
network <- datangkor$stratigraphy

#contingency table
cont <- datangkor$contingency

#obtain the dissimilarities matrices
distance <- CAdist(cont, nPC = 11)
constraint <- adjacency(network)

#You can also run hclustcompro with the dist matrix directly (number of cluster 7)
clustering <- perioclust(D1 = distance, D2 = constraint, alpha = 0.7,k=7,method="ward.D2")
clustering <- perioclust_subdivide(clustering,cluster = 5, nb_class = 2)

#subdivide more than one cluster (number of cluster 7)
clustering2 <- perioclust(D1 = distance, D2 = constraint,0.7,k=7, method = "ward.D2")
clustering2 <- perioclust_subdivide(clustering2,cluster = c(5,7), nb_class = c(2,2))

Run the code above in your browser using DataLab