Skip to contents

Reads MCMC output.


read_chronomodel_events(file, ...)

read_chronomodel_phases(file, ...)

read_chronomodel_model(file, ...)

# S4 method for character
read_chronomodel_events(file, BP = FALSE, sep = ",", dec = ".")

# S4 method for character
read_chronomodel_phases(file, BP = FALSE, sep = ",", dec = ".")

# S4 method for character



the name of the file which the data are to be read from. Each row of the table appears as one line of the file. If it does not contain an absolute path, the file name is relative to the current working directory, getwd(). Tilde-expansion is performed where supported. This can be a compressed file (see file).

Alternatively, file can be a readable text-mode connection (which will be opened for reading if necessary, and if so closed (and hence destroyed) at the end of the function call). (If stdin() is used, the prompts for lines may be somewhat confusing. Terminate input with a blank line or an EOF signal, Ctrl-D on Unix and Ctrl-Z on Windows. Any pushback on stdin() will be cleared before return.)

file can also be a complete URL. (For the supported URL schemes, see the ‘URLs’ section of the help for url.)


Further arguments to be passed to read.table.


A logical scalar: should the data be converted from BP to CE? This should not be TRUE unless you change the default settings in 'OxCal' or 'ChronoModel'.


the field separator character. Values on each line of the file are separated by this character. If sep = "" (the default for read.table) the separator is ‘white space’, that is one or more spaces, tabs, newlines or carriage returns.


the character used in the file for decimal points.


An EventsMCMC or a PhasesMCMC object.


Lanos, Ph., Philippe, A. & Dufresne, Ph. (2015). Chronomodel: Chronological Modeling of Archaeological Data using Bayesian Statistics. URL:

See also


T. S. Dye, N. Frerebeau


if (FALSE) {
## Import ChronoModel Output
path <- "chronomodel/ksarakil"

## Events
path_events <- system.file(path, "Chain_all_Events.csv", package = "fasti")
(chrono_events <- read_chronomodel_events(path_events))

## Phases
path_phases <- system.file(path, "Chain_all_Phases.csv", package = "fasti")
(chrono_phases <- read_chronomodel_phases(path_phases))