CH.index: Evaluate the optimal number of cluster using CH index

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/BiotypeR.r

Description

This function permit from a ecological data frame and a distance matrix between samples to estimated CH index for a range of k clusters

Usage

1
CH.index(dataframe, distance.JSD, kvector = 1:20, clusterSim=FALSE)

Arguments

dataframe

A data frame with species/functions as rows and samples/sites as columns

distance.JSD

a distance matrix between samples/sites

kvector

a numerical vector of k cluster, by default 1:20

clusterSim

logical: if TRUE clusterSim::indexG1 will be used instead of pamk

Details

This functions allow you to estimate the optimal number of biotypes in your dataset taking the k corresponding to the highest CH index.

Value

vector

a vector a CH index for each k

Author(s)

Julien Tap

See Also

index.G1 cluster.biotypes

Examples

1
2
3
4
data(Titanium16)
CH.index(Titanium16S, k=1:10) -> ch
plot(ch, xlab=" k clusters", ylab="CH index")
abline(v=which(ch==max(ch)), lwd=2, col="red") #optimal k

tapj/biotyper documentation built on Oct. 23, 2021, 5:44 a.m.