Skip to contents

Mean

Usage

# S4 method for class 'CalibratedAges'
mean(x, na.rm = FALSE, ..., calendar = getOption("ananke.calendar"))

# S4 method for class 'ProxyRecord'
mean(x, na.rm = FALSE, ...)

Arguments

x

A CalibratedAges object.

na.rm

A logical scalar: should NA values be stripped before the computation proceeds?

...

Currently not used.

calendar

A TimeScale object specifying the target calendar (see calendar()).

Value

A numeric vector.

See also

Other statistics: hdr, median(), quantile()

Author

N. Frerebeau

Examples

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

## Statistics
quantile(cal)
#>      0%   25%   50%   75%  100%
#> X -3984 -3876 -3778 -3729 -3545
#> Y -3984 -3283 -3211 -3145 -2917
median(cal)
#>     X     Y 
#> -3778 -3211 
mean(cal)
#>         X         Y 
#> -3792.679 -3211.160 

## Plot
plot(cal, calendar = CE())

## Need to set 'calendar'
abline(v = median(cal, calendar = CE()), lty = 2, col = "blue")
abline(v = mean(cal, calendar = CE()), lty = 2, col = "red")