Learn R Programming

EcoSimR (version 0.1.0)

ra1: RA1 Niche Overlap Randomization Algorithm

Description

Randomizes a numeric utilization matrix speciesData by replacing all elements with a random uniform [0,1] value.

Usage

ra1(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.

Value

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

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.

References

Kobayashi, S. 1991. Interspecific relations in forest floor coleopteran assemblages: niche overlap and guild structure. Researches in Population Ecology 33: 345-360.

Examples

Run this code
ranUtil <- ra1(speciesData=matrix(rpois(40,0.5),nrow=8))

Run the code above in your browser using DataLab