Learn R Programming

ArchaeoPhases (version 1.4.5)

MultiPhasePlot: Plot of the marginal posterior densities of several groups

Description

Draws a plot with the marginal posterior densities of the minimum and the maximum of the dates included in each group. No temporal order between phases is required. The result is given in calendar year (in format BC/AD).

Usage

MultiPhasePlot(data, position_minimum, position_maximum = position_minimum+1,
  level = 0.95,  title = "Characterisation of several groups", colors = NULL, 
  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_minimum

numeric vector containing the column number corresponding to the minimum of the dates included in each group

position_maximum

numeric vector containing the column number corresponding to the maximum of the dates included in each group. By default, position_maximum = position_minimum + 1.

level

probability corresponding to the level of confidence

title

title of the graph

colors

numeric vector of colors for each group of dates

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

Value

Draws a plot with the marginal posterior densities of the minimum and the maximum of the dates included in each group and adds the time range of each group.

Examples

Run this code
# NOT RUN {
  # Data extracted from ChronoModel software
  data(Phases)
  
  # List of the name of the groups 
  names(Phases)
  
  # Stipulating position_maximum
  MultiPhasePlot(Phases, c(4,2), c(5,3), title = "Succession of phase 1 and phase 2")
  
  # In this case, equivalent to 
  MultiPhasePlot(Phases, c(4,2), title = "Succession of phase 1 and phase 2", colors = c(3,4))
  
  # Export 
  # MultiPhasePlot(Phases, c(4,2), exportFile = "MultiPhasePlot", exportFormat = "PNG")
# }

Run the code above in your browser using DataLab