ra4: RA4 Niche Overlap Randomization Algorithm

Description Usage Arguments Details Value Note References Examples

View source: R/algorithms.R

Description

Randomizes a numeric utilization matrix speciesData by reshuffling the non-zero elements within each row.

Usage

1
ra4(speciesData = matrix(rpois(80, 1), nrow = 10))

Arguments

speciesData

a resource utilization matrix (rows = species, columns = discrete resource states) filled with non-negative real numbers.

Details

The resource utilization matrix (rows = species, columns = discrete resource categories) may include zeroes, but no negative numbers or missing values. Relative resource within a species is first calculated, so the rows need not sum to 1.0.

Value

Returns a random utilization matrix with the same dimensions as the input matrix.

Note

This algorithm is similar to RA3, but adds the additional constraint of retaining the positions of all of the zero elements of the matrix, and reshuffling only the non-zero elements of the matrix within each row. It is more conservative than RA3, but has a low Type I error rate, and, along with RA3, is recommended for null model analysis of niche overlap.

References

Winemiller, K.O. and E.R. Pianka. 1990. Organization in natural assemblages of desert lizards and tropical fishes. Ecological Monographs 60: 27-55.

Examples

1
ranUtil <- ra4(speciesData=matrix(rpois(40,0.5),nrow=8))

Example output

Loading required package: MASS
Warning messages:
1: In shuffledvec[nonzero] <- vec[sample(nonzero)] :
  number of items to replace is not a multiple of replacement length
2: In shuffledvec[nonzero] <- vec[sample(nonzero)] :
  number of items to replace is not a multiple of replacement length

EcoSimR documentation built on May 2, 2019, 7:26 a.m.