get.neighbor {R2BayesX} | R Documentation |
Obtain Neighbors of Given Regions
Description
Extracts the neighbors of a number of regions from a map in graph format.
Usage
get.neighbor(map, regions)
Arguments
map |
map object in graph format. |
regions |
vector of names of regions for which the neighbors should be axtracted. |
Value
A list of vectors containing the neighbors of the elements in regions
.
Author(s)
Felix Heinzl, Thomas Kneib.
See Also
Examples
file <- file.path(find.package("R2BayesX"), "examples", "Germany.gra")
germany <- read.gra(file)
get.neighbor(germany, "1001")
get.neighbor(germany, c("1001", "7339"))
[Package R2BayesX version 1.1-5 Index]