plot_fit {kairos} | R Documentation |
Detection of Selective Processes
Description
Produces an abundance vs time diagram.
Usage
## S4 method for signature 'IncrementTest,missing'
plot(
x,
calendar = getOption("kairos.calendar"),
col.neutral = "#004488",
col.selection = "#BB5566",
col.roll = "grey",
flip = FALSE,
ncol = NULL,
xlab = NULL,
ylab = NULL,
main = NULL,
sub = NULL,
ann = graphics::par("ann"),
axes = TRUE,
frame.plot = axes,
...
)
Arguments
x |
An |
calendar |
An |
col.neutral , col.selection , col.roll |
A vector of colors. |
flip |
A |
ncol |
An |
xlab , ylab |
A |
main |
A |
sub |
A |
ann |
A |
axes |
A |
frame.plot |
A |
... |
Further parameters to be passed to |
Details
Results of the frequency increment test can be displayed on an abundance
vs time diagram aid in the detection and quantification of selective
processes in the archaeological record. If roll
is TRUE
, each time
series is subsetted according to window
to see if episodes of selection
can be identified among decoration types that might not show overall
selection. If so, shading highlights the data points where
fit()
identifies selection.
Value
plot()
is called it for its side-effects: it results in a graphic being
displayed (invisibly returns x
).
Note
Displaying FIT results on an abundance vs time diagram is adapted from Ben Marwick's original idea.
Author(s)
N. Frerebeau
See Also
Other plotting methods:
plot_aoristic
,
plot_event
,
plot_mcd
,
plot_time()
Examples
## Data from Crema et al. 2016
data("merzbach", package = "folio")
## 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]
## Group by phase
## We use the row names as time coordinates (roman numerals)
dates <- as.numeric(utils::as.roman(rownames(counts)))
## Frequency Increment Test
freq <- fit(counts, dates, calendar = NULL)
## Plot time vs abundance
plot(freq, calendar = NULL, ncol = 3, xlab = "Phases")
## Plot time vs abundance and highlight selection
freq <- fit(counts, dates, calendar = NULL, roll = TRUE, window = 5)
plot(freq, calendar = NULL, ncol = 3, xlab = "Phases")