Description Usage Arguments Details Value Author(s) References See Also Examples
Re-assigns members of one cluster to another specified cluster, reducing the number of clusters by one.
1 | mergeclust(clustering,from,to)
|
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 |
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.
A list object of class ‘clustering’ specifying cluster membership for every object.
David W. Roberts droberts@montana.edu
http://ecology.msu.montana.edu/labdsv/R
partition
, partana
, and
clustering
1 2 3 4 5 6 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.