title: Finding adjacent polygons in R (neighbors)
body: <p>I'm starting with a SpatialPolygonsDataFrame which has the data to create a map of the districts of Ghana (available at <a href="http://www.diva-gis.org/datadown">http://www.diva-gis.org/datadown</a>).  I'm trying to create a matrix with the names of the districts as row and column names and 0s/1s in the interior to indicate if two districts are adjacent (neighboring) or not.</p>
  
  <p>I've found several functions in spdep that seem promising, but I can't figure out how to use them for this purpose.  I was able to create a "nb" file with the data using poly2nb, but am unsure how to proceed from here or even if I'm on the right track.</p>
  
  <p>I'd really appreciate any help!  Thank you!</p>