View source: R/hier.vegclust.R
hier.vegclust | R Documentation |
Performs several runs of function 'vegclust' (or 'vegclustdist') on a community data matrix (or distance matrix) using different number of clusters
hier.vegclust(x, hclust, cmin=2,cmax=20, min.size=NULL, verbose=TRUE, ...)
hier.vegclustdist(x, hclust, cmin=2,cmax=20, min.size=NULL, verbose=TRUE, ...)
random.vegclust(x, cmin=2, cmax=20, nstart=10, min.size=NULL, verbose=TRUE, ...)
random.vegclustdist(x, cmin=2, cmax=20, nstart=10, min.size=NULL, verbose=TRUE, ...)
x |
For |
hclust |
A hierarchical clustering represented in an object of type |
cmin |
Number of minimum mobile clusters. |
cmax |
Number of maximum mobile clusters. |
nstart |
A number indicating how many random trials should be performed for each number of groups |
min.size |
If |
verbose |
Flag used to print which number of clusters is currently running. |
... |
Additional parameters for function |
Function hier.vegclust
takes starting cluster configurations from cuts of a dendrogram given by object hclust
. Function random.vegclust
chooses random objects as cluster centroids and for each number of clusters performs nstart
trials. Functions hier.vegclustdist
and random.vegclustdist
are analogous to hier.vegclust
and random.vegclust
but accept distance matrices as input.
Returns an object of type 'mvegclust' (multiple vegclust), which contains a list vector with objects of type vegclust
.
Miquel De Cáceres, CREAF
vegclust
, vegclustdist
, vegclass
, defuzzify
, hclust
## 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 from hierarchical clustering at different number of clusters
wetland.hc = hclust(dist(wetland.chord),method="ward")
wetland.nc1 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=5,
m = 1.2, dnoise=0.75, method="NC")
## Create noise clustering from random seeds at different levels
wetland.nc2 = random.vegclust(wetland.chord, cmin=2, cmax=5, nstart=10,
m = 1.2, dnoise=0.75, method="NC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.