Reads MCMC output.

read_chronomodel_events(file, ...)

read_chronomodel_phases(file, ...)

# S4 method for class 'character'
read_chronomodel_events(file, calendar = CE(), sep = ",", dec = ".")

# S4 method for class 'character'
read_chronomodel_phases(file, calendar = CE(), sep = ",", dec = ".")

Arguments

file

A character string giving the name of the CSV file which the data are to be read from.

...

Currently not used.

calendar

A aion::TimeScale object specifying the calendar (see calendar()). It should be CE() unless you change the default settings in 'ChronoModel'.

sep

A character string specifying the field separator character (see utils::read.table()).

dec

A character string specifying the character used in the file for decimal points (see utils::read.table()).

Value

An EventsMCMC or a PhasesMCMC object.

References

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

See also

Author

T. S. Dye, N. Frerebeau

Examples

if (requireNamespace("ArchaeoData", quietly = TRUE)) {
  ## Import ChronoModel Output
  path <- "chronomodel/ksarakil"

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

  ## Phases
  path_phases <- system.file(path, "Chain_all_Phases.csv", package = "ArchaeoData")
  (chrono_phases <- read_chronomodel_phases(path_phases))
}
#> <PhasesMCMC>
#> - Number of phases: 4
#> - Number of MCMC samples: 30000