R: Median of a vector

Median of a vector {Rfast} | R Documentation

## Median of a vector

### Description

Median of a vector.

### Usage

    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

    x <- rnorm(1000)
    a1 <- Median(x)
    a2 <- median(x)

[Package Rfast version 2.0.4 Index]