Learn R Programming

EcoSimR (version 0.1.0)

sim2: Sim2 Co-occurrence Randomization Algorithm

Description

Randomizes a binary matrix speciesData by reshuffling elements within each row equiprobably.

Usage

sim2(speciesData)

Arguments

speciesData
binary presence-absence matrix (rows = species, columns = sites).

Value

Returns a binary presence-absence matrix with the same dimensions and rowsums as the input matrix.

Details

This algorithm assumes sites are equiprobable, but preserves differences among species (= row sums).

References

Gotelli, N.J. 2000. Null model analysis of species co-occurrence patterns. ecology 81: 2606-2621.

See Also

sim9 co-occurrence algorithm.

Examples

Run this code
randomMatrix <- sim2(speciesData=matrix(rbinom(40,1,0.5),nrow=8))

Run the code above in your browser using DataLab