binPrep: Binning function of radiocarbon dates.

View source: R/aggregation.R

binPrepR Documentation

Binning function of radiocarbon dates.

Description

Prepare a set of bins for controlling the aggregation of radiocarbon dates known to be from the same phase of same archaeological site (for use with spd). Used in cases where there is a concern that unusually high levels of sampling for radiocarbon at a given site or in a given site phase will impede comparison between sites or phases.

Usage

binPrep(sites, ages, h, method = "complete")

Arguments

sites

a vector of character strings (or number to coerce to character) of all sites or site phases. If character strings are used these should not contain underscores (see also below)

ages

a vector of uncalibrated conventional radiocarbon ages or a CalDates class object obtained using the calibrate function.

h

a single numeric value passed to cutree control degree of grouping of similar ages in a phase site.

method

the agglomeration method to be used, passed on to hclust. Defaults to "complete" as in hclust.

Details

If ages is a CalDates class object, median dates are used for the clustering.

Value

A vector of character strings with the same length of the object supplied for the argument ages identifying intra-site or intra-phase grouping, for use with spd.The character strings effectively provide a "name" for each "phase" within a "site", using sequential integers after an underscore. For example if a site named "S001" had four dates grouped into two bins with two dates each, the resulting vector would be "S001_1", "S001_1", "S001_2", and "S001_2".

See Also

spd for generating SPD; binsense for sensitivity analysis pertaining the choice of the parameter h.


rcarbon documentation built on Aug. 24, 2023, 5:11 p.m.