spdep::mat2listw
mat_to_nb.Rd
Wrapper function for spdep::mat2listw.
mat_to_nb(mat)
An adjacency matrix.
A neighbourhood list object.
adj <- rbind(c(0, 1, 0), c(0, 0, 1), c(0, 0, 0)) adj <- adj + t(adj) nb <- mat_to_nb(adj)