1r.quantile(1) GRASS GIS User's Manual r.quantile(1)
2
3
4
6 r.quantile - Compute quantiles using two passes.
7
9 raster, algebra, statistics, percentile, quantile
10
12 r.quantile
13 r.quantile --help
14 r.quantile [-r] input=name [quantiles=integer] [per‐
15 centiles=float[,float,...]] [bins=integer] [file=name] [--over‐
16 write] [--help] [--verbose] [--quiet] [--ui]
17
18 Flags:
19 -r
20 Generate recode rules based on quantile-defined intervals
21
22 --overwrite
23 Allow output files to overwrite existing files
24
25 --help
26 Print usage summary
27
28 --verbose
29 Verbose module output
30
31 --quiet
32 Quiet module output
33
34 --ui
35 Force launching GUI dialog
36
37 Parameters:
38 input=name [required]
39 Name of input raster map
40
41 quantiles=integer
42 Number of quantiles
43 Default: 4
44
45 percentiles=float[,float,...]
46 List of percentiles
47
48 bins=integer
49 Number of bins to use
50 Default: 1000000
51
52 file=name
53 Name for output file (if omitted or "-" output to stdout)
54
56 r.quantile computes quantiles in a manner suitable for use with large
57 amounts of data. It is using two passes.
58
60 Quantiles are calculated following algorithm 7 from Hyndman and Fan
61 (1996), which is also the default in R and numpy.
62
64 Calculation of elevation quantiles (printed to standard-out):
65 g.region raster=elevation -p
66 r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9
67 The output of r.quantile can be used for quantile classification:
68 g.region raster=elevation -p
69 r.quantile elevation quantiles=5 -r --quiet | r.recode elevation \
70 out=elev_quant5 rules=-
71
73 • Hyndman and Fan (1996) Sample Quantiles in Statistical Pack‐
74 ages, American Statistician. American Statistical Association.
75 50 (4): 361-365. DOI: 10.2307/2684934
76
77 • Engineering Statistics Handbook: Percentile, NIST
78
80 r.mode, r.quant, r.recode, r.series, r.stats, r.stats.quantile,
81 r.stats.zonal, r.statistics, r.univar, v.rast.stats
82
84 Glynn Clements
85 Markus Metz
86
88 Available at: r.quantile source code (history)
89
90 Accessed: Saturday Jan 21 21:15:02 2023
91
92 Main index | Raster index | Topics index | Keywords index | Graphical
93 index | Full index
94
95 © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
96
97
98
99GRASS 8.2.1 r.quantile(1)