Skip to content
Prev 21903 / 29559 Next

distance between centroids

Alessandra,

This is pretty straightforward but you need to do your part (show us
what you have done) using a simple reproducible example. For example,
you can use the North Carolina data that comes with spdep. That
package also allows you to identify neighbors.


library(spdep)
library(raster)
nc <- shapefile(system.file("etc/shapes/sids.shp", package="spdep"))
crs(nc) <- "+proj=longlat +ellps=clrk66"


?poly2nb

....

Robert


On Thu, Oct 23, 2014 at 3:48 AM, Alessandra Carioli
<alessandracarioli at gmail.com> wrote: