Learn R Programming

R2BayesX (version 1.1-5)

bnd2gra: Convert Boundary Format to Graph Format

Description

Converts a map in boundary format to a map in graph format.

Usage

bnd2gra(map, npoints = 2)

Value

Returns an adjacency matrix that represents the neighborhood structure of the map object in graph format.

Arguments

map

map in boundary format that should be converted.

npoints

integer. How many points must be shared by two polygons to be a neighbor?

Author

Felix Heinzl, Thomas Kneib.

References

BayesX Reference Manual. Available at https://www.uni-goettingen.de/de/bayesx/550513.html.

See Also

read.bnd, read.gra, write.bnd, write.gra.

Examples

Run this code
data("FantasyBnd")
plotmap(FantasyBnd, names = TRUE)
adjmat <- bnd2gra(FantasyBnd)
adjmat

Run the code above in your browser using DataLab