coi: Cohesiveness Index for Relational Clustering

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

Description

Computes Cohesiveness Index for a Cluster Analysis

Usage

1
coi(mst, groups)

Arguments

mst

A minimum spanning tree matrix (binary)

groups

A vector with the group/cluster assignments for each sample

Value

Returns a something

Note

While the function will still return a value, if all the species abundances are equal to 1 in the input to chao1, a warning will be raised, and the value returned will be equal to the number of species observed.

Author(s)

Matthew Vavrek

See Also

rclust

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## sample vector
a<-c(0,5,1,1,2,0,0,1,0,0,8,45)
chao1(a)

## matrix format
a<-matrix(c(0,5,1,1,2,0,0,1,0,0,8,45),4,3)
chao1(a)
chao2(a)

## presence absence matrix
a<-matrix(c(0,1,1,1,1,0,0,1,0,0,1,1),4,3)
chao1(a)
chao2(a)

Example output

Loading required package: sp
Loading required package: maps
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

[1] 11.5
[1] 4
[1] 6
[1] 6
Warning message:
In chao1(a) :
  This data appears to be presence/absence based, but this estimator is for abundance data only
[1] 6

fossil documentation built on March 23, 2020, 5:06 p.m.