Description Usage Arguments Details Value Author(s) See Also Examples
Attempts to turn its arguments into a vegclust
object
1  as.vegclust(x, y, method="KM", m=1.0, dnoise=NULL, eta=NULL)

x 
A sitebyspecies data matrix (raw mode), or a sitebysite distance matrix (distance mode). 
y 
A vector indicating the cluster that each object in 
method 
A clustering model from which

m 
The fuzziness exponent to be used, relevant for all fuzzy models (FCM, FCMdd, NC, NCdd, PCM and PCMdd) 
dnoise 
The distance to the noise cluster, relevant for noise clustering models (NC, HNC, NCdd and HNCdd). 
eta 
A vector of reference distances, relevant for possibilistic models (PCM and PCMdd). 
This function is used to generate vegclust
objects which can then be used in vegclass
to classify new data. If the input classification is hard (i.e. yes/no membership), cluster centers are calculated as multivariate means, and the method for assigning new data is assumed to be kmeans ("KM"
), i.e. plots will be assigned to the nearest cluster center. If community data is given as sitebyspecies data matrix the cluster centroids are added as mobileCenters
in the vegclust
object. Centroids will not be computed if community data is given as a sitebysite dissimilarity matrix. Moreover, current implementation does not allow y
to be a membership matrix when x
is a distance matrix.
An object of class vegclust
.
Miquel De Cáceres, Forest Science Center of Catalonia.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32  ## 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)), "/"))
## Splits wetland data into two matrices of 30x27 and 11x22
wetland.30 = wetland.chord[1:30,]
wetland.30 = wetland.30[,colSums(wetland.30)>0]
dim(wetland.30)
wetland.11 = wetland.chord[31:41,]
wetland.11 = wetland.11[,colSums(wetland.11)>0]
dim(wetland.11)
## Performs a Kmeans clustering of the data set with 30 sites
wetland.km = kmeans(wetland.30, centers=3, nstart=10)
## Transforms the 'external' classification of 30 sites into a 'vegclust' object
wetland.30.vc = as.vegclust(wetland.30, wetland.km$cluster)
## Assigns the second set of sites according to the (kmeans) membership rule
## That is, sites are assigned to the cluster whose cluster centroids is nearest.
wetland.11.km = vegclass(wetland.30.vc, wetland.11)
## A similar 'vegclust' object is obtained when using the distance mode...
wetland.d.vc = as.vegclust(dist(wetland.30), wetland.km$cluster)
## which can be also used to produce the assignment of the second set of objects
wetland.d.11 = as.data.frame(as.matrix(dist(wetland.chord)))[31:41,1:30]
wetland.d.11.km = vegclass(wetland.d.vc,wetland.d.11)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.