med: Median of a vector

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/median.R

Description

Median of a vector.

Usage

1
2
med(x,na.rm=FALSE)
Median(x,na.rm=FALSE)

Arguments

x

A numerical vector.

na.rm

TRUE or FAlSE for remove NAs if exists.

Details

The function is written in C++ and this is why it is very fast.

Value

The median of the vector of a numbers.

Author(s)

Manos Papadakis <papadakm95@gmail.com>

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.

See Also

nth, colMedians

Examples

1
2
3
x <- rnorm(1000)
a1 <- Median(x) 
a2 <- median(x)

Rfast documentation built on Dec. 11, 2021, 9:59 a.m.