powered by
listw2dgCMatrix(listw, zero.policy = NULL)
library(spdep) data(columbus) listw<-nb2listw(col.gal.nb) spW<-listw2dgCMatrix(listw)
Run the code above in your browser using DataLab