Learn R Programming

RSAGA (version 1.4.2)

centervalue: Pick Center Value from Matrix

Description

Pick the value in the center of a square matrix. Auxiliary function to be used by functions called by focal.function().

Usage

centervalue(x)

Value

value of the matrix entry in the middle of the matrix

Arguments

x

a square matrix

Details

See for example the code of resid.median(). Intended for use with square moving window matrices with an odd number of columns and rows.

See Also

focal.function(), resid.median()

Examples

Run this code
( m <- matrix( round(runif(9,1,10)), ncol=3 ) )
centervalue(m)

Run the code above in your browser using DataLab