sampleDates {rcarbon}R Documentation

Sample random calendar dates

Description

Randomly samples calendar dates from each calibrated date or bin.

Usage

sampleDates(x, bins = NA, nsim, boot = FALSE, verbose = TRUE)

Arguments

x

A 'CalDates' class object.

bins

A vector containing the bin names associated with each radiocarbon date. If set to NA, binning is not carried out.

nsim

Number of sampling repetitions.

boot

A logical value indicating whether bootstrapping is carried out (see details below). Default is FALSE.

verbose

A logical variable indicating whether extra information on progress should be reported. Default is TRUE.

Details

The function randomly samples calendar dates based from calibrated probability distributions. When the bins argument is supplied a single calendar date is sampled from each bin. When boot=TRUE, dates (or bins) are randomly sampled with replacement before calendar dates are sampled.

Value

An object of class simdates with the following elements


[Package rcarbon version 1.5.1 Index]