| Title: | Computes Diversity Indices with Archaeological Data |
|---|---|
| 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". |
| Authors: | Andreu Sansó [aut, cre], Arnaud Barat [aut], Jordi Rosell [aut] |
| Maintainer: | Andreu Sansó <[email protected]> |
| License: | GPL-2 |
| Version: | 0.3.0 |
| Built: | 2026-06-03 06:41:23 UTC |
| Source: | https://github.com/cran/diversityArch |
Computes and prints all the diversity indices
all_indices(x, groups = NULL, B = 1000, cl = 0.95)all_indices(x, groups = NULL, B = 1000, cl = 0.95)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
groups |
Vector of dimension S of factors indicating the groups. If omitted, the decomposition of the indicators is not done. |
B |
Number of bootstrap samples. The default is 1000. |
cl |
Confidence level. A value between 0 and 1. The default is 0.95. |
No return value. It prints the value of all indicators
"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): Quantifying Diversity through Entropy Decomposition. Insights into Hominin Occupation and Carcass Processing at Qesem cave"
shannon, dec_shannon, dominance, equitability, evenness, margalef, menhinick, simpson_D, simpson_E
data(Qesem_s) all_indices(Qesem_s$HU) all_indices(Qesem_s$HU, Qesem_s$Group)data(Qesem_s) all_indices(Qesem_s$HU) all_indices(Qesem_s$HU, Qesem_s$Group)
Computes bootstrap standard error and confidence interval of the diversity indices
bs(x, ind = "shannon", B = 1000, cl = 0.95)bs(x, ind = "shannon", B = 1000, cl = 0.95)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
ind |
Index to be computed. The default value is "shannon". Other possible values are: "simpson_E", "simpson_D", "menhinick", "margalef", "evenness", "equitability" and "dominance". |
B |
Number of bootstrap samples. The default is 1000. |
cl |
Confidence level. A value between 0 and 1. The default is 0.95. |
s: Boostrap standard error.
ci: Confidence interval.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
shannon, dec_shannon, dominance, equitability, evenness, margalef, menhinick, simpson_D, simpson_E
data(Qesem_s) bs(Qesem_s$HU)data(Qesem_s) bs(Qesem_s$HU)
Computes bootstrap confidence intervals of the Shannon's diversity index
bs_dec(x, groups, B = 1000, cl = 0.95)bs_dec(x, groups, B = 1000, cl = 0.95)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
groups |
Vector of dimension S of factors indicating the groups of each species. |
B |
Number of bootstrap samples. The default is 1000. |
cl |
Confidence level. A value between 0 and 1. The default is 0.95. |
ci_bt: Confidence interval for "between groups".
ci_wt: Confidence interval for "within groups".
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) bs_dec(Qesem_s$HU, Qesem_s$Group)data(Qesem_s) bs_dec(Qesem_s$HU, Qesem_s$Group)
Computes bootstrap confidence intervals of the decomposed Shannon's diversity index using evidence from fragments
bs_frag(x, gx, f, gf, B = 1000, cl = 0.95)bs_frag(x, gx, f, gf, B = 1000, cl = 0.95)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
gx |
Vector of dimension S of factors indicating the group of each species. 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 to which the fragments "f" belong. |
B |
Number of bootstrap samples. The default is 1000. |
cl |
Confidence level. A value between 0 and 1. The default is 0.95. |
ci_sh: Confidence interval for Shannon's diversity index with fragments.
ci_bt: Confidence interval for "between groups".
ci_wt: Confidence interval for "within groups".
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
shannon, dec_shannon, shannon_frag
data(Qesem_s) data(Qesem_f) bs_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)data(Qesem_s) data(Qesem_f) bs_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)
Computes equitability and its decomposition
dec_equit(x, groups)dec_equit(x, groups)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
groups |
Vector of dimension S of factors indicating the group of each species. |
equitability: Equitability index.
within: Within groups equitability.
between: Between groups equitability.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) dec_equit(Qesem_s$HU, Qesem_s$Group)data(Qesem_s) dec_equit(Qesem_s$HU, Qesem_s$Group)
Computes Shannon diversity and its decomposition
dec_shannon(x, groups)dec_shannon(x, groups)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
groups |
Vector of dimension S of factors indicating the group of each species. |
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.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) dec_shannon(Qesem_s$HU, Qesem_s$Group)data(Qesem_s) dec_shannon(Qesem_s$HU, Qesem_s$Group)
Modification of the Simpson's dominance index to be restricted between 0 and 1.
dominance(x)dominance(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Dominance index (Modified Simpson's dominance index).
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) dominance(Qesem_s$HU)data(Qesem_s) dominance(Qesem_s$HU)
Computes J Pielou index know as equitability
equitability(x)equitability(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Equitability. J Pielou index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) equitability(Qesem_s$HU)data(Qesem_s) equitability(Qesem_s$HU)
Modification of Simpson's evenness index to be restricted between 0 an 1.
evenness(x)evenness(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Evenness index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) evenness(Qesem_s$HU)data(Qesem_s) evenness(Qesem_s$HU)
Computes Margalef's index
margalef(x)margalef(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Margalef index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) margalef(Qesem_s$HU)data(Qesem_s) margalef(Qesem_s$HU)
Computes Menhinick's index
menhinick(x)menhinick(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Menhinick index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) menhinick(Qesem_s$HU)data(Qesem_s) menhinick(Qesem_s$HU)
Data frame with number of fragments of bones of unidentified species but identified group for several levels in Qesem (Israel). Data source: Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A., (2024)
data(Qesem_f)data(Qesem_f)
Data frame with 4 observations (groups) and 7 levels.
Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A.
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
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
data(Qesem_f) names(data) # The following example replicates some of the results 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(Qesem_f) names(data) # The following example replicates some of the results 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 frame with number of bones of different species 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)
data(Qesem_s)data(Qesem_s)
Data frame with 15 observations and 7 levels.
Blasco, R., Rosell, J., Assaf, E., Barkai, R., Gopher, A.
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
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
data(Qesem_s) names(Qesem_s) # The following example replicates some of the results 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)data(Qesem_s) names(Qesem_s) # The following example replicates some of the results 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)
Computes Shannon's diversity index
shannon(x)shannon(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Shannon's diversity index (Entropy).
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) shannon(Qesem_s$HU)data(Qesem_s) shannon(Qesem_s$HU)
Computes Shannon diversity and its decomposition
shannon_frag(x, gx, f, gf)shannon_frag(x, gx, f, gf)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
gx |
Vector of dimension S of factors indicating the group of each species. 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 to which the fragments "f" belong. |
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.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) data(Qesem_f) shannon_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)data(Qesem_s) data(Qesem_f) shannon_frag(Qesem_s$HU, Qesem_s$Group, Qesem_f$HU, Qesem_f$Group)
Computes Simpson's dominance index.
simpson_D(x)simpson_D(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Simpson's dominance index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) simpson_D(Qesem_s$HU)data(Qesem_s) simpson_D(Qesem_s$HU)
Computes Simpson's evenness index.
simpson_E(x)simpson_E(x)
x |
Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA. |
Simpson's evenness index.
"Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
data(Qesem_s) simpson_E(Qesem_s$HU)data(Qesem_s) simpson_E(Qesem_s$HU)