countingRV: Calculates RV coefficient for partial abundance matrices.

Description Usage Arguments Details Value Author(s) Examples

View source: R/countingRV.R

Description

Calculates RV coefficients of partial abundance matrices by using as reference the complete abundance community matrix. This function is designed to be flexible with regards to the underlying distance used as dist, vegdist, decostand (through the argument transfo) and designdist.

Usage

1
countingRV(comm,partAbund,transfo=NULL,dist=NULL,vegdist=NULL,designdist=NULL,logbase=NULL,...)

Arguments

comm

A complete abundance community matrix. If a data.frame is given instead of a matrix the function converts comm into a matrix and sends a warning message.

partAbund

An object of class partAbund.

transfo

A character string passed to decostand defining how the data should be transformed.

dist

A character string passed to dist defining the distance to apply to comm and partAbund when calculating the RV coefficient.

vegdist

A character string passed to vegdist defining the distance to apply to comm and partAbund when calculating the RV coefficient.

designdist

A character string presenting an equation of the dissimilarities passed to designdist defining the distance to apply to comm and partAbund when calculating the RV coefficient.

logbase

A numeric value defining the log base use for the modified Gower distance. This parameter is used only when transfo is "log" and vegdist is "altGower"

...

arguments passed to dist, vegdist, decostand (through the argument transfo) or designdist when they are used.

Details

Only a single argument between dist, vegdist and designdist an be defined. An error message is sent if multiple arguments are defined simultaneously.

The function allow for transfo and any one of dist, vegdist and designdist to be used simultaneously. However, combining both pre-transformation and distances should only be carried out by expert users.

Value

A vector of RV coefficients for each partial abundance. .

Author(s)

F. Guillaume Blanchet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(mite)

### Calculate partial abundance matrix (up to 35 individuals per site per species)
pAbundMite<-partAbund(mite,countThresh=35)

### Calculate RV coefficients for the partial abundance using Hellinger pre-transformation
RVpartAbund<-countingRV(mite, pAbundMite, transfo="hellinger")

### Calculate RV coefficients for the partial abundance using the modified Gower distance with a log base of 2
RVpartAbund<-countingRV(mite, pAbundMite, transfo="log",vegdist="altGower", logbase=2)

guiblanchet/countComm documentation built on June 3, 2020, 12:37 a.m.