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

fuse

Combine Regions


Description

Combines a list of several regions of a map object in boundary format into a single region.

Usage

fuse(map, regions, name)

Arguments

map

Map object in boundary format that should be modified.

regions

Vector of regions to be combined

name

Name that should be given to the region arising from fusing the specified regions.

Value

Map object in boundary format with the specified regions combined.

Author(s)

Nadja Klein

See Also

Examples

## Not run: require("gpclib")
library("maptools")
gpclibPermit()
map <- read.bnd(system.file("examples/germany9301.bnd", package="BayesX"))
drawmap(map=map, drawnames=TRUE)

#vector of regions to be combined 
regions <- c("1056","1060","1061")
#new name of combined region
newname <- "1"
newmap <- fuse(map,regions,newname)
drawmap(map=newmap,drawnames=TRUE)

#vector of regions to be combined
germany <- read.bnd(system.file("examples/germany.bnd", package="BayesX"))
drawmap(map=germany, drawnames=TRUE)
regions <- c("9371","9373","9374","9471","9472","9474","9574")
#new name of combined region
newname <- "1"
newmap <- fuse(germany,regions,newname)
drawmap(map=newmap,drawnames=TRUE)
## End(Not run)

BayesX

R Utilities Accompanying the Software Package BayesX

v0.3-1
GPL-2 | GPL-3
Authors
Nikolaus Umlauf [aut, cre], Thomas Kneib [aut], Nadja Klein [aut], Felix Heinzl [ctb], Andreas Brezger [ctb], Daniel Sabanes Bove [ctb]
Initial release
2019-08-23

We don't support your browser anymore

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