cal14C | R Documentation |
The function is meant to automatically apply the calibration process to conventional radiocarbon ages, relying on the package Bchron (Haslett & Parnell 2008). Specifically, the function internally selects the appropriate calibration curve based on the latitude associated with each occurrence and the nature of the sample (i.e marine or terrestrial samples).
cal14C(dataset,age=NULL,uncertainty=NULL,latitude=NULL,domain=NULL,
bounds=c(0.025,0.975), clust=0.5, save=TRUE, output.dir=NULL)
dataset |
a |
age |
character. Name of the column in |
uncertainty |
character. Name of the column in |
latitude |
character. Name of the column in |
domain |
character. Name of the column in |
bounds |
numeric. An upper and lower bound (in quantiles) to define the limits of the density probability created for each radiocarbon age (default: 95%). |
clust |
numeric. The proportion of cores used to train |
save , output.dir |
if |
If dataset
includes marine samples, the user should indicate
it in the domain column by indicating "marine" for the corresponding
occurrences. In this case, the function uses the marine20 curve to calibrate the
related radiocarbon ages accordingly.
The initial dataset
with additional
columns providing detailed calibration information for each occurrence. The
new columns indicate the calibration curve used for each occurrence
("curve"), the calibrated radiocarbon ages ("cal_age"), and the values
corresponding to the specified confidence limits derived from the density
estimate of the calibrated radiocarbon ages. If save=TRUE
,
the dataframe is saved as xlsx file in output.dir
.
Alessandro Mondanaro, Silvia Castiglione, Pasquale Raia
Bchron::BchronCalibrate
library(RRgeo)
## Create an example dataset with 100 random radiocarbon ages and errors
set.seed(2025)
data.frame(age=round(runif(100,20000,50000),0),
uncertain=round(runif(100,20,300),0),
latitude=round(runif(100,-90,90),2))->data
data$domain<-"domain"
rep("marine",5)-> data[sample(nrow(data),5),"domain"]
cal14C(dataset=data,
age="age",
uncertainty = "uncertain",
latitude = "latitude",
domain<-"domain",
clust=NULL,
save= FALSE)->res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.