Type: Package
Title: Computes Diversity Indices with Archaeological Data
Version: 0.1.0
Description: Companion package of 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".
License: GPL-2
Imports: methods
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2025-11-21 12:26:42 UTC; HP
Author: Andreu Sansó [aut, cre], Arnaud Barat [aut], Jordi Rosell [aut]
Maintainer: Andreu Sansó <andreu.sanso@uib.eu>
Depends: R (≥ 3.5.0)
Repository: CRAN
Date/Publication: 2025-11-25 20:42:09 UTC

Data used in the examples

Description

Data frame with number of fragments of bones of unidentified spicies but identified group for several levels in Qesem (Israel). Data source: Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., (2024)

Usage

data(Qesem_f)

Value

Data frame with 4 observations (groups) and 7 levels.

Author(s)

Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A.

Source

Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., 2024. Exploring the lack of articular ends at the Middle Pleistocene site of Qesem Cave, Israel. Journal of Human Evolution 189, 103509. doi:10.1016/j.jhevol.2024.103509

References

Barat, A. Sansó, A. Arilla-Osuna, M. Blasco, R., Pérez-Fernández, I., Cifuentes-Alcobenda, G. Llorente, R., Vivar-Ríos, D., Assaf, E. Barkai, R., Gopher, A. & Rosell-Ardèvol, J., 2025. Quantifying Diversity through Entropy Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave. Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., 2024. Exploring the lack of articular ends at the Middle Pleistocene site of Qesem Cave, Israel. Journal of Human Evolution 189, 103509. doi:10.1016/j.jhevol.2024.103509

Examples

data(Qesem_f)
names(data)
# The following example replicates some of the results of Table 5 in
# Barat, A. Sansó, A. Arilla-Osuna, M. Blasco, R., Pérez-Fernández, I.,
# Cifuentes-Alcobenda, G. Llorente, R., Vivar-Ríos, D., Assaf, E. Barkai, R.,
# Gopher, A. & Rosell-Ardèvol, J., 2025. "Quantifying Diversity through Entropy
# Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave".
shannon_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)

Data used in the examples

Description

Data frame with number of bones of different spicies and diferent levels in Qesem (Israel), and a factor related to the size of the animal. Data source: Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., (2024)

Usage

data(Qesem_s)

Value

Data frame with 15 observations and 7 levels.

Author(s)

Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A.

Source

Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., 2024. Exploring the lack of articular ends at the Middle Pleistocene site of Qesem Cave, Israel. Journal of Human Evolution 189, 103509. doi:10.1016/j.jhevol.2024.103509

References

Barat, A. Sansó, A. Arilla-Osuna, M. Blasco, R., Pérez-Fernández, I., Cifuentes-Alcobenda, G. Llorente, R., Vivar-Ríos, D., Assaf, E. Barkai, R., Gopher, A. & Rosell-Ardèvol, J., 2025. Quantifying Diversity through Entropy Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave. Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., 2024. Exploring the lack of articular ends at the Middle Pleistocene site of Qesem Cave, Israel. Journal of Human Evolution 189, 103509. doi:10.1016/j.jhevol.2024.103509

Examples

data(Qesem_s)
names(Qesem_s)
# The following example replicates some of the results of Table 3 in
# Barat, A. Sansó, A. Arilla-Osuna, M. Blasco, R., Pérez-Fernández, I.,
# Cifuentes-Alcobenda, G. Llorente, R., Vivar-Ríos, D., Assaf, E. Barkai, R.,
# Gopher, A. & Rosell-Ardèvol, J., 2025. "Quantifying Diversity through Entropy
# Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave".
all_indices(Qesem_s$HU)

Diversity indices

Description

Computes and prints all the diversity indices

Usage

all_indices(x, groups = NULL)

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.

groups

Vector of dimension S of factors indicating the groups.

Value

No return value. It prints the value of all indicators

References

"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"

See Also

shannon, dec_shannon, dominance, equitability, evenness, margalev, menhinick, simpson_D, simpson_E

Examples

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


Decomposition of the equitability index

Description

Computes equitability and its decomposition

Usage

dec_equit(x, groups)

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.

groups

Vector of dimension S of factors indicating the groups.

Value

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

dec_shannon

Examples

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


Shannon diversity decomposition

Description

Computes Shannon diversity and its decomposition

Usage

dec_shannon(x, groups)

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.

groups

Vector of dimension S of factors indicating the groups.

Value

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

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


Dominance index

Description

Modification of the Simpson's dominance index to be restricted between 0 and 1.

Usage

dominance(x)

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.

Value

Dominance index (Modified Simpson's dominance index).

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

simpson_D

Examples

data(Qesem_s)
dominance(Qesem_s$HU)


Equitability. J Pielou index

Description

Computes J Pielou index know as equitability

Usage

equitability(x)

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.

Value

Equitability. J Pielou index.

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

data(Qesem_s)
equitability(Qesem_s$HU)


Evenness index

Description

Modification of Simpson's evenness index to be restricted between 0 an 1

Usage

evenness(x)

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.

Value

Evenness index.

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

simpson_E

Examples

data(Qesem_s)
evenness(Qesem_s$HU)


Margalev index

Description

Computes Margalev's index

Usage

margalev(x)

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.

Value

Margalev index.

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"

Examples

data(Qesem_s)
margalev(Qesem_s$HU)


Menhinick index

Description

Computes menhinick's index

Usage

menhinick(x)

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.

Value

Menhinick index.

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"

Examples

data(Qesem_s)
menhinick(Qesem_s$HU)


Shannon diversity index

Description

Computes Shannon's diversity index

Usage

shannon(x)

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.

Value

Shannon's diversity index (Entropy).

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

dec_shannon, equitability

Examples

data(Qesem_s)
shannon(Qesem_s$HU)


Shannon diversity decomposition

Description

Computes Shannon diversity and its decomposition

Usage

shannon_frag(x, gx, f, gf)

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.

Value

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

data(Qesem_s)
data(Qesem_f)
shannon_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)


Simpson's dominance index

Description

Computes Simpson's dominance index.

Usage

simpson_D(x)

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.

Value

Simpson's dominance index.

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

dominance, simpson_E

Examples

data(Qesem_s)
simpson_D(Qesem_s$HU)


Simpson's evenness index

Description

Computes Simpson's evenness index.

Usage

simpson_E(x)

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.

Value

Simpson's evenness index.

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

evenness, simpson_D

Examples

data(Qesem_s)
simpson_E(Qesem_s$HU)