get.neighbor: Obtain Neighbors of Given Regions

Description Usage Arguments Value Author(s) See Also Examples

View source: R/get.neighbor.R

Description

Extracts the neighbors of a number of regions from a map in graph format.

Usage

1
  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

add.neighbor, delete.neighbor

Examples

1
2
3
4
file <- file.path(find.package("R2BayesX"), "examples", "Germany.gra")
germany <- read.gra(file)
get.neighbor(germany, "1001")
get.neighbor(germany, c("1001", "7339"))

R2BayesX documentation built on May 31, 2017, 4:27 a.m.

Search within the R2BayesX package
Search all R packages, documentation and source code