dec_shannon: Shannon diversity decomposition

View source: R/dec_shannon.R

dec_shannonR Documentation

Shannon diversity decomposition

Description

Computes Shannon diversity and its decomposition

Usage

dec_shannon(x, groups)

Arguments

x

Vector of dimension S (number of species) with the number of individuals observed in each species, or the distribution frequencies of species. NA values are allowed.

groups

Vector of dimension S of factors indicating the group of each species.

Value

  • shannon: Shannon's total Entropy.

  • within: Within groups entropy.

  • between: Between groups entropy.

  • groups: A data frame with information about each group: relative frequency, internal entropy and number of species.

References

Arnaud Barat, Andreu Sansó, Maite Arilla-Osuna, Ruth Blasco, Iñaki Pérez-Fernández, Gabriel Cifuentes-Alcobenda, Rubén Llorente, Daniel Vivar-Ríos, Ella Assaf, Ran Barkai, Avi Gopher, & Jordi Rosell-Ardèvol (2026) <doi:10.1007/s10816-026-09802-3>.

See Also

shannon

Examples

data(Qesem_s)
dec_shannon(Qesem_s$HU, Qesem_s$Group)


diversityArch documentation built on June 13, 2026, 5:07 p.m.