multi_dates_plot {ArchaeoPhases}R Documentation

Plot of credible intervals or HPD regions of a series of events

Description

Plot of credible intervals or HPD regions of a series of events

Usage

multi_dates_plot(
  data,
  position = 1:ncol(data),
  level = 0.95,
  plot_result = TRUE,
  round = 0,
  intervals = "CI",
  order = "default",
  title = "Plot of intervals",
  subtitle = NULL,
  caption = "ArchaeoPhases",
  x_label = "Calendar Year",
  y_label = NULL,
  height = 7,
  width = 7,
  units = "in",
  x_min = NULL,
  x_max = NULL,
  x_scale = "calendar",
  elapsed_origin_position = NULL,
  dumbbell_size = 1,
  dot_guide = FALSE,
  dot_guide_size = 0.25,
  y_grid = FALSE,
  file = NULL,
  new_window = TRUE
)

Arguments

data

Data frame containing the output of the MCMC algorithm.

position

Numeric vector containing the positions of the columns corresponding to the MCMC chains of interest, or a vector of column names.

level

Probability corresponding to the level of confidence.

plot_result

If TRUE, then draw a plot on the display, else suppress drawing.

round

Integer indicating the number of decimal places to be used.

intervals

One of "CI" for credible intervals, or "HPD" for highest posterior density intervals.

order

Order of the events. If "default" then the order of the csv file is followed, if "increasing" events are ordered by the HPDInf of the first region or the CIInf

title

Title of the plot.

subtitle

Subtitle of the plot.

caption

Caption of the plot.

x_label

X axis label of the plot.

y_label

Y axis label of the plot.

height

Height of the plot in units.

width

Width of the plot in units.

units

A string recognized by ggsave() function, one of "in", "cm", "mm".

x_min

Minimum x axis value.

x_max

Maximum x axis value.

x_scale

One of "calendar" for calendar years, "BP" for years before present, or "elapsed" for years after a specified origin.

elapsed_origin_position

Position of the column corresponding to the origin for elapsed time calculations.

dumbbell_size

Size of the symbols used to plot events.

dot_guide

Switch for guides from y-axis to plot symbols.

dot_guide_size

Size of the dot guides.

y_grid

Switch for horizontal grids.

file

Name of the file to be saved. If NULL then no plot is saved.

new_window

Whether the plot is drawn within a new window or not.

Value

An archaeophases_plot object with the data and metadata needed to reproduce the plot.

Author(s)

Anne Philippe, Anne.Philippe@univ-nantes.fr,

Thomas S. Dye, tsd@tsdye.online, and

Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr

Examples

  data(Events)
  multi_dates_plot(Events, c(2, 4, 3), level = 0.95, intervals = "CI",
                 title = "Plot of CI intervals")
  multi_dates_plot(Events, c(2, 4, 3), level = 0.95, intervals = "HPD",
                 title = "Plot of HPD intervals")
  multi_dates_plot(Events, c(2, 4, 3), level = 0.95, intervals = "HPD",
                 order = "increasing")


[Package ArchaeoPhases version 1.5 Index]