Learn R Programming

ArchaeoPhases (version 1.4)

TempoActivityPlot: Plot of the activity of events

Description

A statistical graphic designed for the archaeological study of rhythms of the long term that embodies a theory of archaeological evidence for the occurrence of events.

Usage

TempoActivityPlot(data, position, plot.result = NULL, level = 0.95,
                               title = "Activity plot",
                               subtitle = NULL, caption = "ArcheoPhases",
                               x.label = "Calendar year",
                               y.label = "Activity",
                               line.types = c("solid"),
                               width = 7, height = 7, units = "in",
                               x.min = NULL, x.max = NULL,
                               file = NULL, x.scale = "calendar",
                               elapsed.origin.position = NULL, 
                               newWindow=TRUE, print.data.result = FALSE)

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

plot.result

a list containing the data to plot, typically the result of a previous run of TempoActivityPlot()

level

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

title

title of the graph

subtitle

subtitle of the graph

caption

caption of the graph

x.label

x axis label of the graph

y.label

y axis label of the graph

line.types

type of the lines drawn of the graph in the order of legend.labels

height

height of the graph in units

width

width of the graph in units

units

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

the position of the column corresponding to the origin for elapsed time calculations

file

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

newWindow

whether the plot is drawn within a new window or not

print.data.result

If TRUE, the list containing the data to plot will be given

Value

It is the derivative of the TempoPlot bayesian estimate. It may also return a list containing the data to plot (if print.data.result = TRUE). The result is given in calendar year (in format BC/AD).

References

Dye, T.S. (2016) Long-term rhythms in the development of Hawaiian social stratification. Journal of Archaeological Science, 71, 1--9.

Examples

Run this code
# NOT RUN {
  data(Events); 
  TempoActivityPlot(Events[1:1000,], c(2:5), print.data.result=FALSE)
  TempoActivityPlot(Events[1:1000,], c(2:5), print.data.result=FALSE)
# }

Run the code above in your browser using DataLab