partition {optpart} | R Documentation |
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’ |
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.
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., |
Author(s)
David W. Roberts droberts@montana.edu http://ecology.msu.montana.edu/labdsv/R
References
http://ecology.msu.montana.edu/labdsv/R
See Also
silhouette
, partition
,
optpart
Examples
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray/curtis')
part <- partana(sample(1:5,nrow(shoshveg),replace=TRUE),dis.bc)
result <- partition(part,dis.bc)