r.quantile(1)
π r.quantile(1) β the GRASS GIS User's Manual, but make it a group chat π
okay bestie, welcome to r.quantile, straight out of the GRASS GIS User's Manual. this is the page where we learn to count in slices. it's giving statistics era and honestly? slay. π
β¨ NAME β¨
r.quantile β compute quantiles using two passes. that's it, that's the whole vibe. two passes, no cap. π
π KEYWORDS π
raster, algebra, statistics, percentile, quantile β iykyk, it's the whole tag wall π¦
πΈ SYNOPSIS πΈ
okay so here's how you actually call her:
r.quantile
r.quantile --help
r.quantile [-r] input=name [quantiles=integer]
[percentiles=float[,float,...]] [bins=integer] [file=name]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π«Ά Flags:
-rβ generate recode rules based on quantile-defined intervals. yes queen, output thatr.recode-ready drip. π₯--overwriteβ allow output files to overwrite existing files. it will absolutely clobber what's there, so know that before you commit. π--helpβ print usage summary--verboseβ verbose module output. she talks a lot. we love her for it. β¨--quietβ quiet module output--uiβ force launching GUI dialog
π§ Parameters:
input=nameβ required, bestie. name of input raster map. can't run the show without the main character. πquantiles=integerβ number of quantiles. default:4. (quartiles, if you're feeling fancy π)percentiles=float[,float,...]β list of percentiles. comma-separated, as many as your heart desires πbins=integerβ number of bins to use. default:1000000. yes, one million. she's thorough. πfile=nameβ name for output file. if omitted or-, output goes to stdout. (the-is the classic "just print it at me" move π)
π« DESCRIPTION π«
r.quantile computes quantiles in a manner suitable for use with large amounts of data. and the way she does it? two passes. that's the whole trick, and it's iconic.
β NOTES β
quantiles are calculated following algorithm 7 from Hyndman and Fan (1996), which is also the default in R and numpy. so if your numbers don't match R, lowkey check yourself before you wreck yourself. no cap. π¦
π EXAMPLE π
calculation of elevation quantiles (printed to standard-out):
g.region raster=elevation -p
r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9
the output of r.quantile can be used for quantile classification:
g.region raster=elevation -p
r.quantile elevation quantiles=5 -r --quiet | r.recode elevation \
out=elev_quant5 rules=-
see that pipe? that's the -r output feeding straight into r.recode with rules=-. chef's kiss. pipeline main character energy. π
π REFERENCES π
- Hyndman and Fan (1996) Sample Quantiles in Statistical Packages, American Statistician. American Statistical Association. 50 (4): 361-365. DOI:
10.2307/2684934 - Engineering Statistics Handbook: Percentile, NIST
π SEE ALSO π
r.mode, r.quant, r.recode, r.series, r.stats, r.stats.quantile, r.stats.zonal, r.statistics, r.univar, v.rast.stats
(the whole friend group, fr fr π«Ά)
π AUTHORS π
- Glynn Clements
- Markus Metz
π¦ SOURCE CODE π¦
Available at: r.quantile source code (history)
Accessed: Saturday Jan 17 05:40:56 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
ok that's the whole page bestie, go forth and slice your rasters π
and that's a wrap on GRASS 8.4.2 β r.quantile(1), signing off. mwah. πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms