A virtual S4 class to represent archaeological data.
samples
A character
vector.
groups
A character
vector.
totals
A numeric
vector giving the absolute row sums.
dates
An integer
vector specifying the date point estimate of each
row.
tpq
An integer
vector specifying the TPQ of each row.
taq
An integer
vector specifying the TAQ of each row.
In the code snippets below, x
is an AbundanceMatrix
object.
get_samples(x)
and get_samples(x) <- value
Get or set
the sample names of x
.
get_groups(x)
and set_groups(x) <- value
Get or set
the groups of x
.
get_dates(x)
and set_dates(x) <- value
Get or set
the dates of x
. value
can be a list
with components tpq
(TPQ -
terminus post quem) and taq
(TAQ - terminus ante quem) or a
numeric
vector (point estimate). The elements of value
are coerced to
integer
with as.integer()
(hence truncated towards zero).
The CountMatrix
, CompositionMatrix
and IncidenceMatrix
classes have
special slots:
samples
for replicated measurements/observation,
groups
to group data by site/area,
dates
to specify the date point estimate of an assemblage,
tqp
and taq
to specify the chronology of an assemblage.
When coercing a data.frame
to a *Matrix
object, an attempt is made to
automatically assign values to these slots by mapping column names (case
insensitive, plural insensitive). This behavior can be disabled by setting
options(arkhe.autodetect = FALSE)
or overrided by explicitly specifying
the columns to be used in as_*()
.
The way chronological information is handled is somewhat opinionated.
Sub-annual precision is overkill/meaningless in most situations: dates are
assumed to be expressed in years CE and are stored as integers (values are
coerced with as.integer()
and hence truncated towards zero).
N. Frerebeau