Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

shp2bnd

convert a shape-file into a boundary object


Description

Converts the geographical information provided in a shape-file into a boundary object (see Chapter 5 of the BayesX Reference Manual)

Usage

shp2bnd(shpname, regionnames, check.is.in = TRUE)

Arguments

shpname

base filename of the shape-file (including path)

regionnames

either a vector of region names or the name of the variable in the dbf-file representing these names

check.is.in

test whether some regions are surrounded by other regions (FALSE speeds up the execution time but may result in a corrupted bnd-file)

Value

Returns a boundary object, i.e. a list of polygons that form the map. See read.bnd for more information on the format.

Author(s)

Felix Heinzl, Daniel Sabanes Bove, Thomas Kneib with contributions by Michael Hoehle and Frank Sagerer.

References

BayesX Reference Manual. Available at http://www.BayesX.org.

See Also

Examples

## read shapefile into bnd object
shpname <- file.path(find.package("R2BayesX"), "examples", "Northamerica")
north <- shp2bnd(shpname = shpname, regionnames = "COUNTRY")

## draw the map
plotmap(north)

R2BayesX

Estimate Structured Additive Regression Models with 'BayesX'

v1.1-1
GPL-2 | GPL-3
Authors
Nikolaus Umlauf [aut, cre], Thomas Kneib [aut], Stefan Lang [aut], Achim Zeileis [aut] (0000-0003-0918-3766)
Initial release
2017-12-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.