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: | 2024-12-17 13:50:13 UTC |
Source: | https://github.com/ArchaeoStat/ArchaeoCal |
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 |
An OxCalOutput
object.
N. Frerebeau
Other OxCal tools:
oxcal_configure()
,
oxcal_execute()
,
oxcal_install()
,
oxcal_parse()
,
plot()
## Not run: ## Download OxCal oxcal_configure() ## Calibrate 14C dates cal <- oxcal_calibrate( names = c("X","Y"), dates = c(5000, 4500), errors = c(45, 35) ) plot(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) ) plot(cal) ## End(Not run)
Setup OxCal
oxcal_configure( command = NULL, os = NULL, ask = TRUE, install_location = NULL, install_url = NULL, verbose = getOption("ArchaeoCal.verbose") )
oxcal_configure( command = NULL, os = NULL, ask = TRUE, install_location = NULL, install_url = NULL, verbose = getOption("ArchaeoCal.verbose") )
command |
A |
os |
A |
ask |
A |
install_location |
A |
install_url |
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()
,
plot()
## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## End(Not run)
Execute an Oxcal Script
oxcal_execute( script, file = NULL, verbose = getOption("ArchaeoCal.verbose"), ... )
oxcal_execute( script, file = NULL, verbose = getOption("ArchaeoCal.verbose"), ... )
script |
A |
file |
A |
verbose |
A |
... |
Further parameters to be passed to |
A list with 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()
,
plot()
## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## 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()
,
plot()
## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## End(Not run)
Read and Parse OxCal Output
oxcal_parse(object) ## S4 method for signature 'list' oxcal_parse(object) ## S4 method for signature 'character' oxcal_parse(object)
oxcal_parse(object) ## S4 method for signature 'list' oxcal_parse(object) ## S4 method for signature 'character' oxcal_parse(object)
object |
A |
An OxCalOutput
object.
N. Frerebeau
https://c14.arch.ox.ac.uk/oxcalhelp/hlp_analysis_file.html
Other OxCal tools:
oxcal_calibrate()
,
oxcal_configure()
,
oxcal_execute()
,
oxcal_install()
,
plot()
## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## 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) plot(res) plot(res, likelihood = TRUE, posterior = FALSE) plot(res, likelihood = FALSE, posterior = TRUE) ## End(Not run)
Plot OxCal Output
## S4 method for signature 'OxCalOutput,missing' plot( x, likelihood = TRUE, posterior = TRUE, warnings = TRUE, col.likelihood = "grey", col.posterior = "blue", lty.likelihood = "solid", lty.posterior = "dashed", main = NULL, sub = NULL, ann = graphics::par("ann"), axes = TRUE, frame.plot = FALSE, panel.first = NULL, panel.last = NULL, ... )
## S4 method for signature 'OxCalOutput,missing' plot( x, likelihood = TRUE, posterior = TRUE, warnings = TRUE, col.likelihood = "grey", col.posterior = "blue", lty.likelihood = "solid", lty.posterior = "dashed", main = NULL, sub = NULL, ann = graphics::par("ann"), axes = TRUE, frame.plot = FALSE, panel.first = NULL, panel.last = NULL, ... )
x |
An |
likelihood |
A |
posterior |
A |
warnings |
A |
col.likelihood , col.posterior
|
A |
lty.likelihood , lty.posterior
|
A |
main |
A |
sub |
A |
ann |
A |
axes |
A |
frame.plot |
A |
panel.first |
An an |
panel.last |
An |
... |
Other graphical parameters may also be passed as arguments to this function. |
plot()
is called it for its side-effects: it results in a graphic
being displayed. Invisibly returns x
.
N. Frerebeau
Other OxCal tools:
oxcal_calibrate()
,
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) ) plot(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) ) plot(cal) ## End(Not run)