Description Usage Arguments Author(s) See Also Examples
This function casts an object of class vegclust
into an object of class kmeans
.
1 |
x |
An object of class |
Miquel De Cáceres, Forest Science Center of Catalonia
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Loads data
data(wetland)
## This equals the chord transformation
## (see also \code{\link{decostand}} in package vegan)
wetland.chord = as.data.frame(sweep(as.matrix(wetland), 1,
sqrt(rowSums(as.matrix(wetland)^2)), "/"))
## Create noise clustering with 3 clusters. Perform 10 starts from random seeds
wetland.vc = vegclust(wetland.chord, mobileCenters=3,
method="KM", nstart=10)
## Reshapes as kmeans object
wetland.km = vegclust2kmeans(wetland.vc)
wetland.km
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.