Sim4: Gotelli's Sim4 Function

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Sim4.R

Description

Randomizes a binary matrix m by shuffling elements within each row. Sampling weights for each column are proportional to column sums.

Usage

1
Sim4(m)

Arguments

m

A binary community matrix.

Details

Makes a call to VectorSample.

Value

A binary matrix randomized by columns and of the same dimensions as the input matrix.

Author(s)

Nicholas J. Gotelli. Help edited by John Quensen.

References

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

Examples

1
2
3
m <- sample(c(1,0), 50, replace=TRUE)
m <- matrix(m, 5, 10)
random.m <- Sim4(m)

jfq3/QsNullModels documentation built on April 6, 2020, 2:06 p.m.