Execute an Oxcal Script
oxcal_execute(
script,
file = NULL,
verbose = getOption("ArchaeoCal.verbose"),
...
)
A character
string of instructions for OxCal.
A character
string naming a file (without extension) to
write script
to. Output files will be named after file
and written to
the same directory.
A logical
scalar: should status updates be displayed?
Further parameters to be passed to system2()
.
An OxCalFiles
object.
Other OxCal tools:
oxcal_calibrate()
,
oxcal_configure()
,
oxcal_install()
,
oxcal_parse()
,
plot()
if (FALSE) {
## 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)
}