fivenum
Tukey Five-Number Summaries

Description

Returns Tukey's five number summary. The summary includes the minimum value, the 0.25 quantile (the lower quartile), the median, the 0.75 quantile (upper quartile) and the maximum value.

Usage

fivenum(x, na.rm = TRUE)

Arguments

x a numeric vector, NA and +/-Infs are allowed.
na.rm a logical value, if TRUE, all NA and NaN's will be removed before calculating.

Details

If an NA exists in x and na.rm is FALSE, a vector of NA's of length 5 is returned. If x is an empty vector, a vector of NA's of length 5 is returned.
Value
a numeric vector of length 5, containing the five-number summary information.
See Also
IQR, boxplot.stats, median, quantile,range
Examples
x <- 1:10
fivenum(x)
# [1]  1.0  3.0  5.5  8.0 10.0
y <- c(1,3, NA, 9)
fivenum(y)
# [1] 1 2 3 6 9
fivenum(y, FALSE)
# [1] NA NA NA NA NA
Package stats version 6.1.1-7
Package Index