plot_time: Abundance vs Time Plot

plot_timeR Documentation

Abundance vs Time Plot

Description

Produces an abundance vs time diagram.

Usage

plot_time(object, dates, ...)

## S4 method for signature 'data.frame,numeric'
plot_time(object, dates, calendar = getOption("kairos.calendar"), ...)

## S4 method for signature 'matrix,numeric'
plot_time(object, dates, calendar = getOption("kairos.calendar"), ...)

Arguments

object

A m \times p numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A data.frame will be coerced to a numeric matrix via data.matrix().

dates

A numeric vector of dates.

...

Further parameters to be passed to aion::plot().

calendar

A TimeScale object specifying the target calendar (see calendar()).

Value

plot_time() is called it for its side-effects: it results in a graphic being displayed (invisibly returns object).

Author(s)

N. Frerebeau

See Also

Other plotting methods: plot_aoristic, plot_event, plot_fit, plot_mcd

Examples

## Data from Crema et al. 2016
data("merzbach", package = "folio")

## Coerce the merzbach dataset to a count matrix
## Keep only decoration types that have a maximum frequency of at least 50
keep <- apply(X = merzbach, MARGIN = 2, FUN = function(x) max(x) >= 50)
counts <- merzbach[, keep]

## Set dates
## We use the row names as time coordinates (roman numerals)
dates <- as.numeric(utils::as.roman(rownames(counts)))

## Plot abundance vs time
plot_time(counts, dates, calendar = NULL, ncol = 3, xlab = "Phases")

kairos documentation built on Nov. 27, 2023, 5:08 p.m.