Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

midpoints

Quantile Summaries


Description

Return quantile summary (minimum, quantiles, maximum) for the input data.

Usage

midpoints(x, n = 1, na.rm = TRUE)

Arguments

x

numeric, maybe including NAs and +/-Infs.

n

positive integer, to determine which quantiles to calculate. return values are 2 ^ n + 1 number summary. n=1 (default) is for three number, namely, minimum, median and maximum. n=2 is for five number, such as quartiles. n=3 is for nine number, such as octiles.

na.rm

logical value indicating whether NAs should be stripped before the computation proceeds.

Details

This function is calling midpoint with n depth.

Value

A numeric vector of length 2 ^ n + 1 containing the summary information.

Author(s)

Shinichiro Tomizono

References

Quantiles: median, quartiles, octiles, hexadeciles, ... http://tomizonor.wordpress.com/2013/04/28/quantiles-octiles/

See Also

Examples

midpoints(1:100, 4)
midpoints(c(rnorm(100), -Inf, Inf), 3)

# define 33 number summary
thirtythreenum <- function(x, ...) midpoints(x, 5, ...)
thirtythreenum(1:100)

elliplot

Ellipse Summary Plot of Quantiles

v1.2.0
MIT + file LICENSE
Authors
Shinichiro Tomizono
Initial release
2018-06-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.