Learn R Programming

MKdescr (version 0.8)

illustrate.quantile: Illustrate Quantiles

Description

Function to illustrate the computation of quantiles.

Usage

illustrate.quantile(x, alpha, type)

Value

An invisible object of class ggplot.

Arguments

x

numeric vector

alpha

numeric value in the interval (0,1).

type

integer values between 1 and 9 selecting one or several of nine quantile algorithms; for more details see quantile. If missing, all nine are computed.

Author

Matthias Kohl Matthias.Kohl@stamats.de

Details

The function visualizes the computation of alpha-quantiles.

See Also

Examples

Run this code
x <- 1:10
illustrate.quantile(x, alpha = 0.15)
illustrate.quantile(x, alpha = 0.5)
illustrate.quantile(x, alpha = 0.8, type = 2)
illustrate.quantile(x, alpha = 0.8, type = c(2, 7))

illustrate.quantile(x = rnorm(20), alpha = 0.95)
illustrate.quantile(x = rnorm(21), alpha = 0.95)

Run the code above in your browser using DataLab