Learn R Programming

raster (version 1.8-3)

freq: Frequency table

Description

Frequency table of the values of a RasterLayer.

Usage

freq(x, ...)

Arguments

x
A RasterLayer object
...
Additional arguments. See under Details

Value

  • A matrix

Methods

A full call as implemented here: freq(x, digits=0, progress, ...) the digits argument is used passed to round with progress, a progres bar can be specified. Choose from "text", "window", or "" (the default, no progress bar)

See Also

count, crosstab and zonal

Examples

Run this code
r <- raster(nrow=18, ncol=36)
r[] <- runif(ncell(r))
r <- r * r * r * 10
freq(r)

Run the code above in your browser using DataLab