-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.Rmd
132 lines (96 loc) · 5.16 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
output: github_document
bibliography: vignettes/bibliography.bib
nocite: '@*'
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = NULL
)
Sys.setenv(LANGUAGE = "en") # Force locale
```
# tabula <img width=120px src="man/figures/logo.png" align="right" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/tesselle/tabula/workflows/R-CMD-check/badge.svg)](https://github.com/tesselle/tabula/actions)
[![codecov](https://codecov.io/gh/tesselle/tabula/graph/badge.svg?token=mTkmZJdm6h)](https://app.codecov.io/gh/tesselle/tabula)
[![CodeFactor](https://www.codefactor.io/repository/github/tesselle/tabula/badge)](https://www.codefactor.io/repository/github/tesselle/tabula)
[![Dependencies](https://tinyverse.netlify.app/badge/tabula)](https://cran.r-project.org/package=tabula)
[![r-universe](https://tesselle.r-universe.dev/badges/tabula)](https://tesselle.r-universe.dev/tabula){.pkgdown-devel}
[![CRAN Version](https://www.r-pkg.org/badges/version/tabula)](https://cran.r-project.org/package=tabula){.pkgdown-release}
[![CRAN checks](https://badges.cranchecks.info/worst/tabula.svg)](https://cran.r-project.org/web/checks/check_results_tabula.html){.pkgdown-release}
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/tabula)](https://cran.r-project.org/package=tabula){.pkgdown-release}
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![DOI Zenodo](https://zenodo.org/badge/DOI/10.5281/zenodo.1489944.svg)](https://doi.org/10.5281/zenodo.1489944)
[![DOI JOSS](https://joss.theoj.org/papers/10.21105/joss.01821/status.svg)](https://doi.org/10.21105/joss.01821)
<!-- badges: end -->
## Overview
An easy way to examine archaeological count data. This package provides several tests and measures of diversity: heterogeneity and evenness (Brillouin, Shannon, Simpson, etc.), richness and rarefaction (Chao1, Chao2, ACE, ICE, etc.), turnover and similarity (Brainerd-Robinson, etc.). It allows to easily visualize count data and statistical thresholds: rank vs. abundance plots, heatmaps, @ford1962 and @bertin1977 diagrams, etc. **tabula** provides methods for:
* Diversity measurement: `heterogeneity()`, `evenness()`, `richness()`, `rarefaction()`, `turnover()`.
* Similarity measurement and co-occurrence: `similarity()`, `occurrence()`.
* Assessing sample size and significance: `bootstrap()`, `jackknife()`, `simulate()`.
* @bertin1977 or @ford1962 (battleship curve) diagrams: `plot_bertin()`, `plot_ford()`.
* Seriograph [@desachy2004]: `seriograph()`, `matrigraph()`.
* Heatmaps: `plot_heatmap()`, `plot_spot()`.
[**kairos**](https://packages.tesselle.org/kairos/) is a companion package to **tabula** that provides functions for chronological modeling and dating of archaeological assemblages from count data.
---
```{r citation, echo=FALSE, comment='', results='asis'}
cite <- utils::citation("tabula")
print(cite, bibtex = FALSE)
```
## Installation
You can install the released version of **tabula** from [CRAN](https://CRAN.R-project.org) with:
```{r cran-installation, eval=FALSE}
install.packages("tabula")
```
And the development version from [GitHub](https://github.com/) with:
```{r gh-installation, eval=FALSE}
# install.packages("remotes")
remotes::install_github("tesselle/tabula")
```
## Usage
```{r packages-load, message=FALSE}
## Install extra packages (if needed)
# install.packages("folio")
## Load the package
library(tabula)
```
*It assumes that you keep your data tidy*: each variable (type/taxa) must be saved in its own column and each observation (sample/case) must be saved in its own row.
```{r ford, fig.width=8, fig.height=7, fig.align="center", out.width='100%'}
## Data from Lipo et al. 2015
data("mississippi", package = "folio")
## Ford diagram
plot_ford(mississippi)
```
```{r occurrence, fig.width=7, fig.height=7, fig.align="center"}
## Co-occurrence of ceramic types
mississippi |>
occurrence() |>
plot_spot()
```
```{r sample-size, fig.width=5, fig.height=5, fig.show="hold", out.width='50%'}
## Data from Conkey 1980, Kintigh 1989, p. 28
data("chevelon", package = "folio")
## Measure diversity by comparing to simulated assemblages
set.seed(12345)
chevelon |>
heterogeneity(method = "shannon") |>
simulate() |>
plot()
chevelon |>
richness(method = "count") |>
simulate() |>
plot()
```
## Translation
This package provides translations of user-facing communications, like messages, warnings and errors, and graphical elements (axis labels). The preferred language is by default taken from the locale. This can be overridden by setting of the environment variable `LANGUAGE` (you only need to do this once per session):
``` r
Sys.setenv(LANGUAGE = "<language code>")
```
Languages currently available are English (`en`) and French (`fr`).
## Contributing
Please note that the **tabula** project is released with a [Contributor Code of Conduct](https://www.tesselle.org/conduct.html). By contributing to this project, you agree to abide by its terms.
## References