Title: | An R Interface to 'OxCal' |
---|---|
Description: | What the package does (one paragraph). |
Authors: | Nicolas Frerebeau [aut, cre] (<https://orcid.org/0000-0001-5759-4944>, Université Bordeaux Montaigne) |
Maintainer: | Nicolas Frerebeau <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.0.9000 |
Built: | 2025-01-17 18:24:59 UTC |
Source: | https://github.com/ArchaeoStat/ArchaeoCal |
Coerce to a Data Frame
## S3 method for class 'OxCalResults' as.data.frame(x, row.names = NULL, optional = FALSE, ...)
## S3 method for class 'OxCalResults' as.data.frame(x, row.names = NULL, optional = FALSE, ...)
x |
A |
row.names |
A |
optional |
A |
... |
Currently not used. |
A data.frame
with the following columns:
name
operation
type
date
error
agreement
convergence
like_range
A list
giving the confidence intervals of the likelihood.
like_density
A list
giving the likelihood.
post_range
A list
giving the confidence intervals of the posterior probability.
post_density
A list
giving the posterior probability.
14C Calibration with OxCal
oxcal_calibrate(names, dates, errors, curve = "IntCal20")
oxcal_calibrate(names, dates, errors, curve = "IntCal20")
names |
A |
dates |
A |
errors |
A |
curve |
A |
A list
with class OxCalResults
(see oxcal_parse()
).
N. Frerebeau
Other OxCal tools:
oxcal_configure()
,
oxcal_execute()
,
oxcal_install()
,
oxcal_parse()
## Not run: ## Download OxCal oxcal_configure() ## Calibrate 14C dates cal <- oxcal_calibrate( names = c("X","Y"), dates = c(5000, 4500), errors = c(45, 35) ) as.data.frame(cal) ## End(Not run)
## Not run: ## Download OxCal oxcal_configure() ## Calibrate 14C dates cal <- oxcal_calibrate( names = c("X","Y"), dates = c(5000, 4500), errors = c(45, 35) ) as.data.frame(cal) ## End(Not run)
Setup OxCal
oxcal_configure( command = NULL, os = NULL, install = TRUE, install_location = NULL, install_url = NULL, ask = TRUE, verbose = getOption("ArchaeoCal.verbose") )
oxcal_configure( command = NULL, os = NULL, install = TRUE, install_location = NULL, install_url = NULL, ask = TRUE, verbose = getOption("ArchaeoCal.verbose") )
command |
A |
os |
A |
install |
A |
install_location |
A |
install_url |
A |
ask |
A |
verbose |
A |
Downloads the latest version of Oxcal (if needed) and sets the executable path correctly.
Invisibly returns the path to the OxCal executable.
N. Frerebeau
Other OxCal tools:
oxcal_calibrate()
,
oxcal_execute()
,
oxcal_install()
,
oxcal_parse()
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
Execute an Oxcal Script
oxcal_execute( script, file = NULL, mcmc = "MCMC_Sample", verbose = getOption("ArchaeoCal.verbose"), ... )
oxcal_execute( script, file = NULL, mcmc = "MCMC_Sample", verbose = getOption("ArchaeoCal.verbose"), ... )
script |
A |
file |
A |
mcmc |
A |
verbose |
A |
... |
Further parameters to be passed to |
A list
with class OxCalOutput
containing the following elements:
oxcal
A character
string giving the path to the .oxcal file.
js
A character
string giving the path to the .js file.
log
A character
string giving the path to the .log file.
txt
A character
string giving the path to the .txt file.
csv
A character
string giving the path to the .csv file.
N. Frerebeau
https://c14.arch.ox.ac.uk/oxcalhelp/hlp_analysis_file.html
Other OxCal tools:
oxcal_calibrate()
,
oxcal_configure()
,
oxcal_install()
,
oxcal_parse()
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
Download OxCal
oxcal_install( install_url = NULL, install_location = NULL, verbose = getOption("ArchaeoCal.verbose") )
oxcal_install( install_url = NULL, install_location = NULL, verbose = getOption("ArchaeoCal.verbose") )
install_url |
A |
install_location |
A |
verbose |
A |
Invisibly returns the path to the OxCal directory.
N. Frerebeau
Other OxCal tools:
oxcal_calibrate()
,
oxcal_configure()
,
oxcal_execute()
,
oxcal_parse()
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
Read and Parse OxCal Output
oxcal_parse(path) ## S3 method for class 'OxCalOutput' oxcal_parse(path) ## S3 method for class 'character' oxcal_parse(path)
oxcal_parse(path) ## S3 method for class 'OxCalOutput' oxcal_parse(path) ## S3 method for class 'character' oxcal_parse(path)
path |
A |
A list
with class OxCalResults
containing the following elements:
ocd
A list
of OxCal data which holds the ranges, probability
distributions, etc. for each parameter.
model
A list
of information about the model.
calib
A list
of information about the calibration curve.
N. Frerebeau
https://c14.arch.ox.ac.uk/oxcalhelp/hlp_analysis_file.html
Other OxCal tools:
oxcal_calibrate()
,
oxcal_configure()
,
oxcal_execute()
,
oxcal_install()
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)
## Not run: ## Download OxCal oxcal_configure() ## Custom script scr <- 'Plot() { Sequence("Sequence1") { Boundary("Begin"); Phase("Phase1") { R_Date("Lab-1",5000,25); R_Date("Lab-2",4900,37); }; Boundary("Between"); Phase("Phase2") { R_Date("Lab-3",4800,43); }; Boundary("End"); }; };' out <- oxcal_execute(scr) res <- oxcal_parse(out) as.data.frame(res) ## End(Not run)