read_chronomodel: Read ChronoModel Output

read_chronomodelR Documentation

Read ChronoModel Output

Description

Reads MCMC output.

Usage

read_chronomodel_events(file, ...)

read_chronomodel_phases(file, ...)

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

## S4 method for signature '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.

Author(s)

T. S. Dye, N. Frerebeau

References

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

See Also

utils::read.table()

Other read methods: as_coda(), as_events(), as_phases(), check, read_bcal(), read_oxcal()

Examples

if (requireNamespace("ArchaeoData", quietly = TRUE)) {
  ## Construct the paths to the data
  path <- file.path("chronomodel", "ksarakil")
  path_events <- system.file(path, "Chain_all_Events.csv", package = "ArchaeoData")
  path_phases <- system.file(path, "Chain_all_Phases.csv", package = "ArchaeoData")

  ## Import ChronoModel events
  (chrono_events <- read_chronomodel_events(path_events))

  ## Import ChronoModel phases
  (chrono_phases <- read_chronomodel_phases(path_phases))
}

ArchaeoStat/ArchaeoPhases documentation built on Jan. 19, 2025, 2:33 p.m.