Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mergeclust

Merge Specified Clusters in a Classification


Description

Re-assigns members of one cluster to another specified cluster, reducing the number of clusters by one.

Usage

mergeclust(clustering,from,to)

Arguments

clustering

a vector of (integer) cluster memberships, or an object of class‘partition’, ‘partana’, or ‘clustering’

from

the cluster number to be vacated

to

the cluster to which members will be re-assigned

Details

The function simply renumbers members of one cluster with the number of another, but greatly simplifies managing the list objects class‘partition’, ‘partana’, or ‘clustering’ and simplifes the syntax.

Value

A list object of class ‘clustering’ specifying cluster membership for every object.

Author(s)

David W. Roberts droberts@montana.edu

References

See Also

Examples

data(shoshveg)                   # returns a vegetation data.frame
dis.bc <- dsvdis(shoshveg,'bray/curtis')   # returns a Bray/Curtis 
                                 # dissimilarity matrix
opt.5 <- optpart(5,dis.bc)       # five cluster partition
opt.5a <- mergeclust(opt.5,5,4)  # reassigns member from cluster 
                                 #   5 to 4

optpart

Optimal Partitioning of Similarity Relations

v3.0-3
GPL (>= 2)
Authors
David W. Roberts <droberts@montana.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.