Learn R Programming

ccaPP (version 0.3.4)

fastMedian: Fast implementation of the median

Description

Compute the sample median with a fast C++ implementation.

Usage

fastMedian(x)

Value

The sample median.

Arguments

x

a numeric vector.

Author

Andreas Alfons

See Also

fastMAD, median

Examples

Run this code
set.seed(1234)  # for reproducibility
x <- rnorm(100)
fastMedian(x)

Run the code above in your browser using DataLab