This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/median.html
median {base}R Documentation

Median Value

Description

Compute the sample median of the vector of values given as its argument.

Usage

median(x, na.rm=FALSE)

Arguments

x

a numeric vector containing the values whose median is to be computed.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

See Also

quantile for general quantiles.

Examples

median(1:4)# = 2.5 [even number]
median(c(1:3,100,1000))# = 3 [odd, robust]

[Package base version 1.5.0 ]