med: Median

View source: R/med.R

medR Documentation

Median

Description

The function computes the median of a vector. Unlike median, it is guaranteed to return a value which is a component of the input vector.

Usage

med(x)

Arguments

x

a vector

Value

a scalar defined as quantile(x, .5, type=3)[[1]]

Author(s)

Piotr Fryzlewicz

Examples

med(1:4)
median(1:4)

unbalhaar documentation built on April 19, 2022, 5:05 p.m.