Learn R Programming

fundiversity (version 1.1.1)

fd_raoq: Compute Rao's entropy index (Rao's Q)

Description

This function computes Rao's Quadratic Entropy following Rao (1982). NB: Rao's quadratic entropy is 0 when there are no species in the site.

Usage

fd_raoq(traits = NULL, sp_com, dist_matrix = NULL)

Value

a data.frame with two columns:

  • site the names of the sites as the row names of the input sp_com,

  • Q the values of Rao's quadratic entropy at each site.

NB: Rao's quadratic entropy is 0 when there are no species in the site.

Arguments

traits

Trait matrix with species as rows and traits as columns. It has to contain exclusively numerical values. This can be either a matrix, a data.frame, or a Matrix::Matrix() object.

sp_com

Site-species matrix with sites as rows and species as columns if not provided, the function considers all species with equal abundance in a single site. This can be either a matrix, a data.frame, or a Matrix::Matrix() object.

dist_matrix

A dissimilarity matrix that can be provided instead of a trait data.frame (default: NULL). This can be either a matrix, a data.frame, or a Matrix::Matrix() object.

References

Pavoine S., Dolédec S. (2005). The apportionment of quadratic entropy: a useful alternative for partitioning diversity in ecological data. Environmental and Ecological Statistics, 12(2), 125–138. tools:::Rd_expr_doi("10.1007/s10651-005-1037-2")

Examples

Run this code
data(traits_birds)
fd_raoq(traits_birds)

Run the code above in your browser using DataLab