add.neighbor | R Documentation |
Adds a neighborhhod relationship between two given regions to a map object in graph format.
add.neighbor(map, region1, region2)
map |
Map object in graph format that should be modified. |
region1, region2 |
Names of the regions that should be connected as neighbors. |
Returns an adjacency matrix that represents the neighborhood structure of map
plus the new neighborhood relation in graph format.
Felix Heinzl, Thomas Kneib
get.neighbor
,delete.neighbor
,read.gra
,write.gra
bnd2gra
germany <- read.gra(system.file("examples/germany.gra", package="BayesX"))
get.neighbor(germany, c("1001", "7339"))
germany <- add.neighbor(germany, "7339", "1001")
get.neighbor(germany, c("1001", "7339"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.