Produces an abundance vs time diagram.
Usage
plot_time(object, dates, ...)
# S4 method for class 'data.frame,numeric'
plot_time(object, dates, calendar = get_calendar(), ...)
# S4 method for class 'matrix,numeric'
plot_time(object, dates, calendar = get_calendar(), ...)Arguments
- object
- A \(m \times p\) - numeric- matrixor- data.frameof count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table). A- data.framewill be coerced to a- numeric- matrixvia- data.matrix().
- dates
- A - numericvector of dates.
- ...
- Further parameters to be passed to - aion::plot().
- calendar
- An - aion::TimeScaleobject specifying the target calendar (see- aion::calendar()).
Value
plot_time() is called it for its side-effects: it results in a graphic
being displayed (invisibly returns object).
See also
Other plotting methods:
plot.AoristicSum(),
plot.EventDate(),
plot.IncrementTest(),
plot.MeanDate()
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")
 
