https://github.com/joeroe/c14
R package for tidy radiocarbon data
https://github.com/joeroe/c14
archaeology r r-package radiocarbon-dates tidy-data
Last synced: 26 days ago
JSON representation
R package for tidy radiocarbon data
- Host: GitHub
- URL: https://github.com/joeroe/c14
- Owner: joeroe
- License: other
- Created: 2021-01-30T15:20:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T10:26:17.000Z (11 months ago)
- Last Synced: 2025-08-19T02:45:30.737Z (about 2 months ago)
- Topics: archaeology, r, r-package, radiocarbon-dates, tidy-data
- Language: R
- Homepage: https://c14.joeroe.io
- Size: 4.74 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# c14
[](https://www.repostatus.org/#wip)
[](https://CRAN.R-project.org/package=c14)
[](https://github.com/joeroe/c14/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/joeroe/c14)**c14** provides basic classes and functions for radiocarbon data in R.
It makes it easier to combine methods from several existing packages (e.g. rcarbon, Bchron, oxcAAR, c14bazAAR, ArchaeoPhases, stratigraphr) together and work with them in a tidy data workflow.It was forked from [stratigraphr](https://github.com/joeroe/stratigraphr) v0.3.0.
## Installation
You can install the development version of c14 from GitHub with the [remotes](https://remotes.r-lib.org) package:
```r
# install.packages("remotes")
remotes::install_github(c("joeroe/controller", "joeroe/c14"))
```Note that the dependency [controller](https://github.com/joeroe/controller) is also not yet available on CRAN.
## Usage
The main aim of c14 is to make it easier to work with radiocarbon data within a tidy workflow.
For example, we can combine `dplyr::filter()` with `c14_calibrate()` to only calibrate dates from a specific site:```{r eg-calibrate, message=FALSE}
library("c14")
library("dplyr", warn.conflicts = FALSE)ppnd |>
filter(site == "Ganj Dareh") |>
select(lab_id, cra, error) |>
mutate(cal = c14_calibrate(cra, error))
```The resulting `cal`-class vector can be assigned to a new column, allowing us to keep working with the data in the context of the original data frame or tibble.