Learn R Programming

hierarchicalDS (version 3.0)

rect_adj: Produce an RW1 adjacency matrix for a rectangular grid for use with areal spatial models (queens move)

Description

Produce an RW1 adjacency matrix for a rectangular grid for use with areal spatial models (queens move)

Usage

rect_adj(x, y, byrow = FALSE)

Arguments

x

number of cells on horizontal side of grid

y

number of cells on vertical side of grid

byrow

If TRUE, cell indices are filled along rows (default is FALSE)

Value

adjacency matrix