resid.median {RSAGA}R Documentation

Residual Median and Quantile Filters for Grids

Description

These functions use the median and other quantiles to describe the difference between a grid value and its neighborhood. They are designed for use with focal.function().

Usage

## S3 method for class 'median'
resid(x)

## S3 method for class 'minmedmax'
resid(x)

## S3 method for class 'quantile'
resid(x, probs)

## S3 method for class 'quartiles'
resid(x)

Arguments

x

a square matrix with the grid data from the moving window, possibly containing NA values

probs

numeric vector of probabilities in [0,1] to be passed to quantile()

Details

These functions are designed for being called by focal.function(), which repeatedly passes the contents of a square or circular moving window to these functions.

The resid.median function rests the value of the central grid cell from the median of the whole moving window. Thus, in terms of topography, a positive residual median indicates that this grid cell stands out compared to its surroundings. resid.quantile gives more flexibility in designing such residual attributes.

Value

If x is provided, a numeric vector of length 1 (resid.median), 3 (resid.minmedmax and resid.quartiles), or length(probs) (resid.quantile).

If x is missing, a character vector of same length giving suggested variable (or file) names, such as "rmed". See focal.function() for details.

See Also

focal.function(), quantile(), median(), centervalue()


[Package RSAGA version 1.4.0 Index]