powered by
Extract adjacency matrix from the map
getAmat(geo, names)
SpatialPolygonsDataFrame of the map
character vector of region ids to be added to the neighbours list
Spatial djacency matrix.
# NOT RUN { data(DemoMap) mat <- getAmat(geo = DemoMap$geo, names = DemoMap$geo$REGNAME) mat DemoMap$Amat # }
Run the code above in your browser using DataLab