Skip to contents

Wrapper function for spdep::mat2listw.

Usage

mat_to_nb(mat)

Arguments

mat

An adjacency matrix.

Value

A neighbourhood list object.

Examples

adj <- rbind(c(0, 1, 0), c(0, 0, 1), c(0, 0, 0))
adj <- adj + t(adj)
nb <- mat_to_nb(adj)