Learn R Programming

diversityArch (version 0.1.0)

shannon_frag: Shannon diversity decomposition

Description

Computes Shannon diversity and its decomposition

Usage

shannon_frag(x, gx, f, gf)

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 spicies.

Arguments

x

Vector of dimension S (spicies) with the numbers of observed individuals in each spicy. NA values are allowed. 0 values are converted to NA.

gx

Vector of dimension S of factors indicating the groups. G groups.

f

Vector of dimension G with the number (>0) of fragments in each group

gf

Vector of dimension G of factors indicating the groups of f.

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 (2025): Quantifying Diversity through Entropy Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave"

See Also

shannon

Examples

Run this code
data(Qesem_s)
data(Qesem_f)
shannon_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)

Run the code above in your browser using DataLab