edit.nb | R Documentation |
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
.
This method relies on direct contact with the graphics device. Do not use in RStudio.
## S3 method for class 'nb'
edit(name, coords, polys=NULL, ..., use_region.id=FALSE)
name |
an object of class |
coords |
matrix of region point coordinates; if missing and polys= inherits from |
polys |
if polygon boundaries supplied, will be used as background; must inherit from |
... |
further arguments passed to or from other methods |
use_region.id |
default |
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.
Roger Bivand Roger.Bivand@nhh.no
summary.nb
, plot.nb
## Not run:
columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")[1], quiet=TRUE)
class(columbus)
if (FALSE) nnb1 <- edit.nb(col.gal.nb, polys=as(columbus, "Spatial"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.