.TH r.mode .SH NAME \fIr.mode\fR \- Finds the mode of values in a cover map within areas assigned the same category value in a user-specified base map. .br .I (GRASS Raster Program) .SH SYNOPSIS \fBr.mode\fR .br \fBr.mode help\fR .br \fBr.mode\fR \fBbase\*=\fIname \fBcover\*=\fIname \fBoutput\*=\fIname\fR .SH DESCRIPTION .I r.mode calculates the most frequently occurring value (i. e., mode) of data contained in a \fIcover\fR raster map layer for areas assigned the same category value in the user-specified \fIbase\fR raster map layer. These modes are stored in the new \fIoutput\fR map layer. The \fIoutput\fR map is actually a \fIreclass\fR of the \fIbase\fR map. If the user simply types \fBr.mode\fR on the command line, the user is prompted for the parameter values through the standard parser interface (see \fIparser\fR manual entry). Alternately, the user can supply all needed parameter values on the command line. .LP \fBParameters:\fR .IP \fBbase\*=\fIname\fR 18 An existing raster map layer in the user's current mapset search path. For each group of cells assigned the same category value in the \fIbase\fR map, the mode of the values assigned these cells in the \fIcover\fR map will be computed. .IP \fBcover\*=\fIname\fR 18 An existing raster map layer containing the values to be used to compute the mode within each category of the \fIbase\fR map. .IP \fBoutput\*=\fIname\fR 18 The name of a new map layer to contain program output (a \fIreclass\fR of the \fIbase\fR map). The mode values will be stored in the \fIoutput\fR map. .SH NOTES The user should use the results of \fIr.mode\fR with care. Since this utility assigns a value to each cell which is based on global information (i.e., information at spatial locations other than just the location of the cell itself), the resultant map layer is only valid if the geographic region and mask settings are the same as they were at the time that the result map was created. Results are affected by the current region settings and mask. .SH SEE ALSO .I g.region, .I r.average, .I r.cats, .I r.clump, .I r.describe, .I r.mapcalc, .I r.mask, .I r.median, .I r.mfilter, .I r.neighbors, .I r.reclass, .I r.stats, and .I parser .SH "AUTHOR" Michael Shapiro, U.S. Army Construction Engineering Research Laboratory