allen.read.mcmc.chains: Read MCMC chains from Bayesian calibration software output

View source: R/io.R

allen.read.mcmc.chainsR Documentation

Read MCMC chains from Bayesian calibration software output

Description

Reads chains for two intervals from one or two csv files of MCMC output from a Bayesian calibration application. The function checks for missing or incorrect parameters and whether or not files exist. It exits with an error message if there are problems.

Usage

allen.read.mcmc.chains(
  mcmc.file,
  positions,
  mcmc.file.2 = NULL,
  positions.2 = NULL,
  names = c("Interval 1", "Interval 2"),
  app = "bcal",
  decimal = ".",
  separator = ",",
  quiet = "partial"
)

Arguments

mcmc.file

path to the csv file of MCMC output

positions

a vector of 2 or 4 column indices of mcmc.file

mcmc.file.2

optional path to another csv file of MCMC output

positions.2

a vector of 2 column indices of mcmc.file.2

names

a vector of two strings naming the intervals specified by the positions parameters(s)

app

one of 'bcal', 'oxcal', or 'chronomodel'

decimal

optional decimal character for Chronomodel output

separator

optional separator character for Chronomodel output

quiet

One of 'no' to allow messages and warnings, 'partial' (default) to suppress messages and allow warnings, or 'yes' to suppress messages and warnings.

Value

a list with two components: result and names, where result contains the MCMC chains and names contains the names parameter.

Author(s)

Thomas S. Dye


tsdye/allen.archaeology documentation built on April 6, 2023, 10:12 a.m.