data(oldcol)
B <- spweights.constants(nb2listw(COL.nb, style="B"))
W <- spweights.constants(nb2listw(COL.nb, style="W"))
C <- spweights.constants(nb2listw(COL.nb, style="C"))
S <- spweights.constants(nb2listw(COL.nb, style="S"))
print(data.frame(rbind(unlist(B), unlist(W), unlist(C), unlist(S)),
row.names=c("B", "W", "C", "S")))
Run the code above in your browser using DataLab