Installation
You can install the latest version of ArchaeoCal from our repository with:
options(repos = c(CRAN = "https://cloud.r-project.org",
universe = "https://archaeostat.r-universe.dev"))
install.packages("ArchaeoCal")
And the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("ArchaeoStat/ArchaeoCal")
Usage
This example uses data available through the ArchaeoData package which is available in a separate repository. ArchaeoData provides OxCal (Bronk Ramsey 2009) input models.
## Install the latest version
install.packages("ArchaeoData", repos = "https://archaeostat.r-universe.dev")
## Load package
library(ArchaeoCal)
## Download OxCal
oxcal_configure(ask = FALSE)
## Construct the path to the OxCal script
path <- file.path("oxcal", "ksarakil", "ksarakil.oxcal")
file <- system.file(path, package = "ArchaeoData")
## Read the script from Bosch et al. 2015
scr <- readLines(file)
## Print
# cat(scr, sep = "\n")
## Execute
## /!\ this may take a while /!\
out <- oxcal_execute(scr, file = "path/to/my/results")
## Parse OxCal output
res <- oxcal_parse(out)
References
Bronk Ramsey, Christopher. 2009. “Bayesian Analysis of Radiocarbon Dates.” Radiocarbon 51 (1): 337–60. https://doi.org/10.1017/S0033822200033865.