Skip to contents

Coerce to a Data Frame

Usage

# S4 method for class 'CalibratedAges'
as.data.frame(x, ..., calendar = getOption("ananke.calendar"))

# S4 method for class 'RECE'
as.data.frame(x, ..., calendar = getOption("ananke.calendar"))

# S4 method for class 'ProxyRecord'
as.data.frame(x, ..., calendar = getOption("ananke.calendar"))

Arguments

x

An object.

...

Further parameters to be passed to data.frame().

calendar

An aion::TimeScale object specifying the target calendar (see aion::calendar()). If NULL, rata die are returned.

Value

A data.frame with an extra time column.

See also

Other mutators: labels(), mutators, subset()

Author

N. Frerebeau

Examples

## Calibrate multiple dates
cal <- c14_calibrate(
  values = c(5000, 4500),
  errors = c(45, 35),
  names = c("X", "Y")
)

head(as.data.frame(cal))
#>    time            X Y
#> 1 -3984 1.110191e-06 0
#> 2 -3983 1.434164e-06 0
#> 3 -3982 1.845486e-06 0
#> 4 -3981 2.365558e-06 0
#> 5 -3980 3.020421e-06 0
#> 6 -3979 3.589420e-06 0
head(as.data.frame(cal, calendar = BP()))
#>   time            X Y
#> 1 5934 1.110191e-06 0
#> 2 5933 1.434164e-06 0
#> 3 5932 1.845486e-06 0
#> 4 5931 2.365558e-06 0
#> 5 5930 3.020421e-06 0
#> 6 5929 3.589420e-06 0
head(as.data.frame(cal, calendar = NULL))
#>       time            X Y
#> 1 -3984 CE 1.110191e-06 0
#> 2 -3983 CE 1.434164e-06 0
#> 3 -3982 CE 1.845486e-06 0
#> 4 -3981 CE 2.365558e-06 0
#> 5 -3980 CE 3.020421e-06 0
#> 6 -3979 CE 3.589420e-06 0