Last chance! 50% off unlimited learning
Sale ends in
Interface between Matrix class objects and weights list
listw2dgCMatrix(listw, zero.policy = NULL)
a listw
object created for example by nb2listw
See lagsarlm
for details
Matrix class object: a sparse Matrix
# NOT RUN {
library(spdep)
data(columbus)
listw<-nb2listw(col.gal.nb)
spW<-listw2dgCMatrix(listw)
# }
Run the code above in your browser using DataLab