clustergram.cmeans: cmeans function for clustergram

Description Usage Arguments Details Value Examples

View source: R/Clustergram.R

Description

cmeans function for clustergram

Usage

1
clustergram.cmeans(Data, k, method = "cmeans", ...)

Arguments

Data

Should be a scales matrix. Where each column belongs to a different dimension of the observations.

k

Number of desired groups for the c-means clustering.

method

Clustering method for the cmeans function.

...

Additional parameters to be passed to the cmeans function.

Details

This is an implementation of Fuzzy c-means clustering (with the cmeans function of the e1071 package) for the clustergram function. The return list is internally used by the clustergram to build the clustergram plot.

Value

A list containing the cluster vector and the centers matrix (see cmeans function).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
####### Example data:
   SyntheticTrial <- SyntheticData(SpeciesNum = 100,
                                   CommunityNum = 3, SpCo = NULL,
                                   Length = 500,
                                   Parameters = list(a=c(40, 80, 50),
                                                     b=c(100,250,400),
                                                     c=rep(0.03,3)),
                                   dev.c = .015, pal = c("#008585", "#FBF2C4", "#C7522B"))

   ######## 6 clustergram plots
   for (i in 1:6) clustergram(as.matrix(SyntheticTrial[,2:ncol(SyntheticTrial)]),
                              clustering.function = clustergram.cmeans,
                              k.range = 2:10, line.width = .2)
 

EcotoneFinder documentation built on Feb. 17, 2021, 1:07 a.m.