as_cal: Convert a foreign object to a cal object

View source: R/cal_convert.R

as_calR Documentation

Convert a foreign object to a cal object

Description

as_cal() converts objects from other packages that represent calibrated radiocarbon dates to the c14 cal class. Methods are currently implemented for:

  • CalDates: from rcarbon::calibrate()

  • oxcAARCalibratedDate and oxcAARCalibratedDatesList: from oxcAAR::oxcalCalibrate()

  • BchronCalibratedDates: from Bchron::BchronCalibrate()

These functions are intended for complex S3 objects from other packages. The generic constructor cal() can be used for data frames and other base structures.

Usage

as_cal(x)

## S3 method for class 'data.frame'
as_cal(x)

## S3 method for class 'matrix'
as_cal(x)

## S3 method for class 'CalDates'
as_cal(x)

## S3 method for class 'oxcAARCalibratedDatesList'
as_cal(x)

## S3 method for class 'oxcAARCalibratedDate'
as_cal(x)

## S3 method for class 'BchronCalibratedDates'
as_cal(x)

Arguments

x

Object from another package to be converted to a cal object.

Value

Vector of class c14_cal (cal).


joeroe/c14 documentation built on Nov. 24, 2024, 11:47 p.m.