Learn R Programming

rich (version 0.2)

c2rcv: Compares the cumulative richness of two communities and rescales the richnesses in function of density

Description

c2rcv first rarefies the richness of the community with highest density to get an estimation of its richness for a density comparable to that of the community with lower density. A randomization test is then performed on the difference between these richnesses. Randomizations are performed under the constraint that the resulting density for both communities is comparable to that of the community with lower density.

Usage

c2rcv(com1,com2,nrandom,tolerance=0.1,pr1=0.025,pr2=0.975,verbose=FALSE)

Arguments

com1
A first species-sample matrix (community 1). Rows correspond to samples whereas columns stand for species.
com2
A second species-sample matrix (community 2). Rows correspond to samples whereas columns stand for species.
nrandom
Number of randomizations to be performed. Default fixed to 99.
tolerance
A number used to calculate the range of acceptable values for the density of simulated communities. Let $D$ be largest density (com1 or com2). The acceptable interval is $D \pm tolerance \times D$.
pr1
Lower probability level for quantile computations. Default fixed to 0.025.
pr2
Higher probability level for quantile computations. Default fixed to 0.975.
verbose
If verbose==TRUE the function returns detailed randomization outputs.

Value

  • dmeanThe mean value of the difference between the rarefied cumulative richness and the observed cumulative richness in the other community.
  • q1First quantile for the distribution of randomized values of dmean.
  • q2Second quantile for the distribution of randomized values of dmean.
  • If verbose==TRUE, c2rcv returns 6 additional records of length equal to the number of randomization:
  • dA vector of length nrandom containing the values of the differences between the rarefied cumulative richness and the observed cumulative richness in the other community for each randomization.
  • drandA vector of length nrandom containing the values of the randomized differences between the rarefied cumulative richness and the observed cumulative richness in the other community.
  • rarefieDA vector of length nrandom containing the density of the community with the largest initial density after rarefaction. These values are as close to the density of the community with lower density as the parameter tolerance is low.
  • lowerDThe density of the community with lower density. This value is constant.
  • rarefiedSA vector of length nrandom containing the cumulative richness of the rarefied community. These values are to be compared with lowerDS.
  • lowerDSCumulative richness of the community with lower density.

Details

The function calls raref2 to rarefy the species richness of the community with higher density.

References

Manly, B.F.J. (1997). Randomization and Monte Carlo methods in biology. Chapman & Hall.

See Also

raref2, c2cv, rich

Examples

Run this code
data(efea)
c2rcv(com1=efea$ef,com2=efea$ea,nrandom=99,tolerance=0.01,verbose=FALSE)

Run the code above in your browser using DataLab