Execute an Oxcal Script
Usage
oxcal_execute(
script,
file = NULL,
mcmc = "MCMC_Sample",
verbose = getOption("ArchaeoCal.verbose"),
...
)Arguments
- script
A
characterstring of instructions for OxCal.- file
A
characterstring naming a file (without extension) to writescriptto. Output files will be named afterfileand written to the same directory.- mcmc
A
characterstring giving the name of the output file for the MCMC samples (without extension). It must match theNameargument of OxCal'sMCMC_Sample()function. Only used ifscriptcontains theMCMC_Sample()command.- verbose
A
logicalscalar: should status updates be displayed?- ...
Further parameters to be passed to
system2().
Value
A list with class OxCalOutput containing the following elements:
See also
Other OxCal tools:
oxcal_calibrate(),
oxcal_configure(),
oxcal_install(),
oxcal_parse()
Examples
if (FALSE) { # \dontrun{
## 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)
} # }