trimean: Tukey's Trimean

View source: R/aggregators.R

trimeanR Documentation

Tukey's Trimean

Description

A robust mean estimator more efficient than the median, first proposed by Tukey.

Usage

trimean(x, na.rm = FALSE)

Arguments

x

A numeric vector

na.rm

Whether to remove missing values. The function will error if NAs are present while FALSE.

Value

The trimean of x.

Examples

a <- rnorm(100)
a[1] <- 1000
trimean(a)
mean(a)


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.