OccurrencePlot {ArchaeoPhases}R Documentation

Plot occurrences

Description

A statistical graphic designed for the archaeological study of when events of a specified kind occurred

Usage

OccurrencePlot(
  data,
  position,
  plot.result = NULL,
  level = 0.95,
  intervals = "CI",
  title = "Occurrence plot",
  subtitle = NULL,
  caption = "ArchaeoPhases",
  labelXaxis = "Calendar year",
  labelYaxis = NULL,
  language = "English",
  occurrence = "occurrence",
  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,
  newWindow = TRUE,
  print.data.result = FALSE
)

Arguments

data

Data frame containing the output of the MCMC algorithm.

position

Numeric vector containing the position of the column corresponding to the MCMC chains of interest.

plot.result

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

level

Probability corresponding to the level of confidence.

intervals

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

title

Title of the plot.

subtitle

Subtitle of the plot.

caption

Caption of the plot.

labelXaxis

Label of the x-axis.

labelYaxis

Label of the y-axis.

language

String indicating a language recognized by the toOrdinal package.

occurrence

String to append to each y-axis tic label.

height

Plot height in units.

width

Plot width in units.

units

String recognized by the 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 time elapsed from a specified origin.

elapsed.origin.position

Position of the column to use as the origin for elapsed time calculations.

dumbbell.size

Size of the plot symbol.

dot.guide

Switch for a horizontal guide from the y axis.

dot.guide.size

Size of the dot guide.

y.grid

Switch for horizontal grid lines.

file

Name of the file that will be saved if specified. If NULL no plot will be saved.

newWindow

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

print.data.result

If TRUE, the list containing the data to plot will be returned.

Details

If we have k events, then we can estimate the calendar date t corresponding to the smallest date such that the number of events observed before t is equal to k. The OccurrencePlot() estimates these occurrences and gives the credible interval or the highest posterior density (HPD) region with a desired level of confidence.

Value

NULL, called for its side effects. It may also return a list containing the data to plot (if print.data.result = TRUE).

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);
  OccurrencePlot(Events[1:1000, ], c(2:5),  print.data.result = FALSE)


[Package ArchaeoPhases version 1.5 Index]