mean: Mean value of 'datey' or 'durationy'

meanR Documentation

Mean value of datey or durationy

Description

Gets the mean value of a vector of datey or durationy as a scalar.

This will entail rounding if the mean of the underlying click counts is not an integer.

These are S3 methods for the mean generic.

Usage

## S3 method for class 'datey_interval'
mean(x, ..., na.rm = FALSE)

## S3 method for class 'datey'
mean(x, ..., na.rm = FALSE)

## S3 method for class 'durationy'
mean(x, ..., na.rm = FALSE)

Arguments

x

The datey or durationy.

...

Not used.

na.rm

A logical (TRUE or FALSE) indicating whether NA values should be removed before the computation.

Value

A scalar of datey or durationy as appropriate.

See Also

datey, durationy, max_min

Examples

    t <- datey(2000:2003)
    t
    mean(t)

datey documentation built on July 14, 2026, 5:06 p.m.