bnd2gra: Convert Boundary Format to Graph Format

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/bnd2gra.R

Description

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

Usage

1
bnd2gra(map)

Arguments

map

Map in boundary format that should be converted.

Value

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

Author(s)

Felix Heinzl, Thomas Kneib

References

BayesX Reference Manual. Available from http://www.bayesx.org

See Also

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

Examples

1
2
tanzania.bnd <- read.bnd(system.file("examples/tanzania.bnd", package="BayesX"))
tanzania.gra <- bnd2gra(tanzania.bnd)

Example output

Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

Note: Function plotsurf depends on akima which has
 a restricted licence that explicitly forbids commercial use.
 akima is therefore disabled by default and may be enabled by
 akimaPermit(). Calling this function includes your agreement to
 akima`s licence restrictions.
Read 7450 records
Note: map consists of 21 polygons
Note: map consists of 20 regions
Reading map ... finished
Warning messages:
1: Note: First and last point of polygon 4 (region 6) are not identical 
2: Note: First and last point of polygon 6 (region 3) are not identical 
3: Note: First and last point of polygon 7 (region 10) are not identical 
4: Note: First and last point of polygon 9 (region 1) are not identical 
5: Note: First and last point of polygon 10 (region 19) are not identical 
6: Note: First and last point of polygon 11 (region 19) are not identical 
7: Note: First and last point of polygon 12 (region 20) are not identical 
8: Note: First and last point of polygon 17 (region 17) are not identical 
9: Note: First and last point of polygon 21 (region 15) are not identical 
Start neighbor search ...
progress: 10%
progress: 20%
progress: 30%
progress: 40%
progress: 50%
progress: 60%
progress: 70%
progress: 80%
progress: 90%
progress: 100%
Neighbor search finished.

BayesX documentation built on Aug. 24, 2019, 9:03 a.m.