quantileSeq(): Quantiles from Ordered Data
quantileSeq() computes quantiles from a data sequence, identifying values below which a chosen fraction of observations falls. Quartiles and percentiles are common examples.
Prepare data first
Quantiles depend on ordering and interpolation conventions. Sort data with sort() when needed, and document the selected probability and method. Use median() for the 50th-percentile concept and mean() for an average, which answers a different question.
Ensure the sequence is nonempty and that probabilities are within the accepted range. Extreme quantiles can be sensitive to small samples; inspect count with size() and outliers with min() or max().