Include self in neighbours list
The function includes the region itself in its own list of neighbours, and sets attribute "self.included" to TRUE.
include.self(nb)
nb |
input neighbours list of class |
The function returns an object of class nb
with a list of integer vectors containing neighbour region number ids; attribute "self.included" is set to TRUE.
Roger Bivand Roger.Bivand@nhh.no
columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE) col.gal.nb <- read.gal(system.file("weights/columbus.gal", package="spData")[1]) coords <- coordinates(as(columbus, "Spatial")) summary(col.gal.nb, coords) summary(include.self(col.gal.nb), coords)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.