delete.neighbor: Delete Neighborhood Relations

Description Usage Arguments Value Author(s) See Also Examples

View source: R/delete.neighbor.R

Description

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

Usage

1
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.gra, bnd2gra.

Examples

1
2
3
4
5
6
7
8
## read the graph file
file <- file.path(find.package("R2BayesX"), "examples", "Germany.gra")
germany <- read.gra(file)

## delete some neighbors
get.neighbor(germany, c("7339"))
germany <- delete.neighbor(germany, "7339", "7141")
get.neighbor(germany, c("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