BayesX (version 0.2-3)

read.gra: Read Geographical Information in Graph Format

Description

Reads the geographical information provided in a file in graph format (see Ch. 5 of the BayesX Reference Manual) and stores it in a map object.

Usage

read.gra(file, sorted=FALSE)

Arguments

Value

Returns an adjacency matrix that represents the neighborhood structure defined in the graph file. Additional attributes aredimDimension of the (square) adjacency matrix.dimnamesList of region names corresponding to rows and columns of the adjacency matrix.classIndicates whether the map is stored in boundary format (bnd) or graph format (gra). Maps returned by read.gra are of class gra

References

BayesX Reference Manual. Available from http://www.stat.uni-muenchen.de/~bayesx/

See Also

write.gra,read.bnd,write.bnd,get.neighbor,add.neighbor,delete.neighbor

Examples

Run this code
germany <- read.gra(system.file("examples/germany.gra", package="BayesX"))
attributes(germany)

Run the code above in your browser using DataLab