Learn R Programming

ArchaeoPhases (version 1.1)

MultiDatesPlot: Plot of the endpoints of credible intervals or HPD intervals of a series of dates

Description

Draws a plot of segments corresponding to the endpoints of the intervals (CI or HPD) of each selected date. The result is given in calendar year (in format BC/AD).

Usage

MultiDatesPlot(data, position, level = 0.95,  intervals = "CI", 
  title = "Plot of intervals", labelXaxis = "Calendar Year", 
  exportFile = NULL, exportFormat = "PNG")

Arguments

data

dataframe containing the output of the MCMC algorithm. The MCMC samples should be in calendar year (BC/AD).

position

numeric vector containing the position of the column corresponding to the MCMC chains of interest

level

probability corresponding to the level of confidence used to estimate the credible interval

intervals

"CI" corresponds to the credible intervals, "HPD" to the highest density regions

title

title of the graph

labelXaxis

label of the horizontal axis

exportFile

the name of the file to be saved. If NULL then no graph is saved

exportFormat

the format of the export file : SVG or PNG.

Examples

Run this code
  data(Events)
  MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="CI", title = "Plot of CI intervals")
  MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="HPD", title = "Plot of HPD intervals")
  MultiDatesPlot(Events, c(2,4,3), level = 0.95, intervals ="HPD", exportFile = "MultiDatesPlot", 
  exportFormat = "PNG")

Run the code above in your browser using DataLab