Otherwise summary(rook_nb) will output a weird looking list, not a true "nb" object. Can avoid this by calling library(spdep) first, but probably good to incorporate in here to start with.