edit.nb

0th

Percentile

Interactive editing of neighbours lists

The function provides simple interactive editing of neighbours lists to allow unneeded links to be deleted, and missing links to be inserted. It uses identify to pick the endpoints of the link to be deleted or added, and asks for confirmation before committing. If the result is not assigned to a new object, the editing will be lost - as in edit.

Keywords
spatial
Usage
"edit"(name, coords, polys=NULL, ..., use_region.id=FALSE)
Arguments
name
an object of class nb
coords
matrix of region point coordinates; if missing and polys= inherits from SpatialPolygons, the label points of that object are used
polys
if polygon boundaries supplied, will be used as background; must inherit from SpatialPolygons
...
further arguments passed to or from other methods
use_region.id
default FALSE, in identify use 1-based observation numbers, otherwise use the nb region.id attribute values
Value

The function returns an object of class nb with the edited list of integer vectors containing neighbour region number ids, with added attributes tallying the added and deleted links.

See Also

summary.nb, plot.nb

Aliases
  • edit.nb
Examples
## Not run: 
# example(columbus)
# class(columbus)
# nnb1 <- edit.nb(col.gal.nb, polys=columbus)
# ## End(Not run)
Documentation reproduced from package spdep, version 0.6-9, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.