fuse | R Documentation |
Combines a list of several regions of a map object in boundary format into a single region.
fuse(map, regions, name)
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. |
Map object in boundary format with the specified regions combined.
Nadja Klein
read.bnd
,write.bnd
## Not run: 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.