Learn R Programming

ananke (version 0.1.0)

mean: Mean

Description

Mean

Usage

# S4 method for CalibratedAges
mean(x, na.rm = FALSE, ..., calendar = get_calendar())

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

Value

A numeric vector.

Arguments

x

A CalibratedAges object.

na.rm

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

...

Currently not used.

calendar

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

Author

N. Frerebeau

See Also

Other statistics: interval_credible(), interval_hdr(), median(), quantile()

Examples

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

## Statistics
quantile(cal)
median(cal)
mean(cal)

## 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")

Run the code above in your browser using DataLab