Skip to contents

Coerce to a Data Frame

Usage

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

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

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

Arguments

x

An object.

...

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

calendar

A TimeScale object specifying the target calendar (see 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 -1455491 1.110191e-06 0
#> 2 -1455125 1.434164e-06 0
#> 3 -1454760 1.845486e-06 0
#> 4 -1454395 2.365558e-06 0
#> 5 -1454030 3.020421e-06 0
#> 6 -1453664 3.589420e-06 0