nbPerm: Number of swaps that can be performed

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

Description

The number of permutations is calculated by summing the number of "swappable" sub-matrices per pair of abundance classes. The number of abundance classes needs to be relatively low, the swapClass algorithm being efficient on semi-quantitative multi-classes (or ordinal) variables (e.g. Braun-Blanquet- type abundance/dominance scores) but not on continuous quantitative variables.

Usage

1
nbPerm(mat)

Arguments

mat

an object of class matrix with abundance classes.

Details

nbPerm is the sum of "swappable" sub-matrices divided by the number of cells in the matrix (number of rows x number of columns). nbPerm calls a dynamically defined functions (swapClass_NBP) with in-lined C code compiled by setCMethod on package load.

Value

a single numeric value.

Author(s)

Benjamin Borgy (benjamin.borgy@gmail.com), Remi Perronne, Xavier Reboud

References

Borgy B. - Dynamic and assembly of weed communities: Approach by statistical modeling (2011). Ph.D. Thesis. INRA Agroicologie & Universiti de Bourgogne. DOI: 10.13140/RG.2.1.1738.1601

See Also

nullModel

Examples

1
2
MAT=matrix(sample(0:3,50*20,replace=TRUE,prob=c(.7,.1,.1,.1)),ncol=20)
nbPerm(MAT)

swapClass documentation built on May 1, 2019, 7:24 p.m.