Learn R Programming

leastcostpath (version 2.0.12)

neighbourhood: neighbourhood matrix to represent adjacent cells

Description

neighbourhood matrix to represent adjacent cells

Usage

neighbourhood(neighbours)

Value

matrix neighbourhood matrix

Arguments

neighbours

numeric or matrix Expected numeric values are 4, 8, 16, 32, or 48. A user-supplied matrix of 0 and 1s can be supplied. Here, 0 denotes non-adjaency and 1 denotes adjacency

Author

Joseph Lewis