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

midpoint

Center of Indexes


Description

Divide a given range of index into two of exact halves.

Usage

midpoint(x)

Arguments

x

range of index. c(min.index, max.index)

Details

This function implements the concept of median, and is used in the midpoints to calculate quantiles.

Value

A list of two numeric vectors is returned.

[[1]]

a range of index for the lower half

[[2]]

a range of index for the higher half

Lengths of the two halves are exactly same. If the parent range has an odd length, the exact center index is used both at the end of the lower half and at the start of the higher half.

Author(s)

Shinichiro Tomizono

References

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

See Also

Examples

midpoint(c(2,8))
# results are shown below.
# [[1]]
# [1] 2 5
# 
# [[2]]
# [1] 5 8

midpoint(c(2,9))
# results are shown below.
# [[1]]
# [1] 2 5
# 
# [[2]]
# [1] 6 9

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.