Learn R Programming

optpart (version 3.0-3)

partition: Convert Object to Partition Object

Description

Convert an object of class ‘partana’ or class ‘clustering’ to an object of class ‘partition’.

Usage

partition(x, dist, …)

Arguments

x

an object which inherits from class ‘clustering’

dist

an object of class ‘dist’

ancillary arguments to pass to ‘partition’

Value

an object of class ‘partition’ with components (and possibly others):

clustering

vector of numeric cluster assignments

silinfo

a list with all silhouette information, only available when the number of clusters is non-trivial, i.e., \(1 < k < n\). See ‘silhouette’

Details

A ‘partition’ object is the output of several functions in package ‘cluster’. This utility function converts objects from package ‘optpart’ to ‘partitions’ so that functions in that library are available.

References

http://ecology.msu.montana.edu/labdsv/R

See Also

silhouette, partition, optpart

Examples

Run this code
# NOT RUN {
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray/curtis')
part <- partana(sample(1:5,nrow(shoshveg),replace=TRUE),dis.bc)
result <- partition(part,dis.bc)
# }

Run the code above in your browser using DataLab