Learn R Programming

np (version 0.40-13)

uocquantile: Compute Quantiles

Description

uocquantile is a function which computes quantiles of an unordered, ordered, or continuous variable x.

Usage

uocquantile(x, prob)

Arguments

x
an ordered, unordered or continuous variable.
prob
quantile to compute.

Value

  • A quantile computed from x.

Details

uocquantile is a function which computes quantiles of unordered, ordered, or a continuous variable x. If x is unordered, the mode is returned. If x is ordered, the level for which the cumulative distribution is >= prob is returned. If x is continuous, quantile is invoked and the result returned.

See Also

quantile

Examples

Run this code
x <- rbinom(n = 100, size = 10, prob = 0.5)
uocquantile(x, 0.5)

Run the code above in your browser using DataLab