Dear community, It should be a very simple question with a straightforward answer - so please forgive my foolishness.
By default, poly2nb() provides the neighbor list of a region in terms of numbers, for example: library(spdep) library(spDataLarge) poly2nb(bristol_zones) -> bqueen bqueen[1] The output is [cid:157ba602-300e-4f6b-8875-ea050def287c] which is expected. But often the case this is not convenient. So I want to provide a vector of names to label each region, and expect when I type bqueen[1], it can return something like a list of place names. According to the help of poly2nb(), this is implemented by row.names(). However, it does not work: [cid:be6a526c-5629-4c17-af44-972fb84f4a04] It looks like the output neglects the argument of row.names. How should I solve this issue? Thanks in advance! 叶翔 YE, Xiang THINKING SPATIALLY<http://www.linkedin.com/in/spatialyexiang>. Ph.D. in Spatial Statistics
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo