Learn R Programming

raster (version 2.1-25)

adjacency: Pairs of adjacent cells

Description

Identify pairs of cells that are adjacent. This function is obsolete; use {adjacent} in stead.

Usage

adjacency(x, fromCells, toCells, directions)

Arguments

x
Raster* object
fromCells
a vector of cell numbers for which adjacent cells should be calculated
toCells
a vector of cell numbers from which adjacent cells are selected. You can use the adjacent function if you want all cells to be considered
directions
in how many direction cells should be connected: 4, 8 or 16; or "bishop"

Value

  • A two column matrix with each row containing a pair of adjacent cells.

See Also

adjacent