Learn R Programming

asbio (version 0.2-1)

fidelity: Fidelity of species in a community to a particular group

Description

The function fidelity calcuates the proportion of experimental units (sites) in a group a species occurs in, compared to the total number of sites the species occurs in across all groups.

Usage

fidelity(Y, cat, digits = 4)

Arguments

Y
An n x p community matrix.
cat
An n x 1 vector of categorical assignments.
digits
The number of significant digits in output

Value

  • Returns a p x r matrix of species fidelities (where r is the number of categorcal assignments, e.g. factor levels.)

See Also

const, evenness, veg.table

Examples

Run this code
library(vegan)
data(dune)
data(dune.env)
fidelity(dune,dune.env[,3])

Run the code above in your browser using DataLab