sampleDates: Sample random calendar dates

Description Usage Arguments Details Value

View source: R/utilities.R

Description

Randomly samples calendar dates from each calibrated date or bin.

Usage

1
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


rcarbon documentation built on Jan. 13, 2021, 7:09 p.m.