Skip to contents

Read and Parse OxCal Output

Usage

oxcal_parse(path)

# S3 method for class 'OxCalOutput'
oxcal_parse(path)

# S3 method for class 'character'
oxcal_parse(path)

Arguments

path

A character string naming a JavaScript file which the data are to be read from (or a list returned by oxcal_execute()).

Value

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.

See also

Author

N. Frerebeau

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)
} # }