delete.neighbor: Delete Neighborhood Relations

View source: R/delete.neighbor.R

delete.neighborR Documentation

Delete Neighborhood Relations

Description

Adds the neighborhhod relationship between two given regions from a map object in graph format.

Usage

delete.neighbor(map, region1, region2)

Arguments

map

Map object in graph format that should be modified.

region1, region2

Names of the regions that should no longer be regarded as neighbors.

Value

Returns an adjacency matrix that represents the neighborhood structure of map minus the deleted neighborhood relation in graph format.

Author(s)

Felix Heinzl, Thomas Kneib

See Also

get.neighbor,add.neighbor,read.gra,write.grabnd2gra

Examples

germany <- read.gra(system.file("examples/germany.gra", package="BayesX"))
get.neighbor(germany, c("7339"))
germany <- delete.neighbor(germany, "7339", "7141")
get.neighbor(germany, c("7339"))

BayesX documentation built on Oct. 20, 2023, 9:11 a.m.