Hello R Users, I wanted to find the weights and adjacency matrix of texas that can be used in Openbugs.
library("spdep") library("maps") library("maptools") tx_shape<-readShapePoly(".....\\Districts_10_11.shp") tx_nb<-poly2nb(tx_shape) There is a command called "dnearneigh" in spdep but is not useful here as it requires a set of coordinates for the whole data, but tx_shape is giving me coordinates for every district. I don't know what thing I am missing here. I would be glad if anyone can help with this. Shant. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.