Running examples in 'BayesX-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fuse
> ### Title: Combine Regions
> ### Aliases: fuse
> ### Keywords: spatial
> 
> ### ** Examples
> 
> require("gpclib")
Loading required package: gpclib
General Polygon Clipper Library for R (version 1.5-5)
	Type 'class ? gpc.poly' for help
> library("maptools")
Loading required package: sp
Checking rgeos availability: TRUE
> gpclibPermit()
Warning in gpclibPermit() :
  support for gpclib will be withdrawn from maptools at the next major release
[1] TRUE
> map <- read.bnd(system.file("examples/germany9301.bnd", package="BayesX"))
Read 2588 records
Note: map consists of 83 polygons
Note: map consists of 63 regions
Reading map ...Warning: Note: First and last point of polygon 2 (region 1002) are not identical
Warning: Note: First and last point of polygon 4 (region 1004) are not identical
Warning: Note: First and last point of polygon 6 (region 1053) are not identical
Warning: Note: First and last point of polygon 7 (region 1054) are not identical
Warning: Note: First and last point of polygon 8 (region 1054) are not identical
Warning: Note: First and last point of polygon 9 (region 1054) are not identical
Warning: Note: First and last point of polygon 10 (region 1054) are not identical
Warning: Note: First and last point of polygon 11 (region 1054) are not identical
Warning: Note: First and last point of polygon 12 (region 1054) are not identical
Warning: Note: First and last point of polygon 13 (region 1054) are not identical
Warning: Note: First and last point of polygon 18 (region 1056) are not identical
Warning: Note: First and last point of polygon 20 (region 1058) are not identical
Warning: Note: First and last point of polygon 21 (region 1059) are not identical
Warning: Note: First and last point of polygon 22 (region 1060) are not identical
Warning: Note: First and last point of polygon 23 (region 1061) are not identical
Warning: Note: First and last point of polygon 24 (region 1062) are not identical
Warning: Note: First and last point of polygon 25 (region 2000) are not identical
Warning: Note: First and last point of polygon 26 (region 2000) are not identical
Warning: Note: First and last point of polygon 28 (region 3101) are not identical
Warning: Note: First and last point of polygon 29 (region 3102) are not identical
Warning: Note: First and last point of polygon 30 (region 3103) are not identical
Warning: Note: First and last point of polygon 32 (region 3152) are not identical
Warning: Note: First and last point of polygon 36 (region 3156) are not identical
Warning: Note: First and last point of polygon 39 (region 3158) are not identical
Warning: Note: First and last point of polygon 40 (region 3251) are not identical
Warning: Note: First and last point of polygon 43 (region 3201) are not identical
Warning: Note: First and last point of polygon 44 (region 3254) are not identical
Warning: Note: First and last point of polygon 45 (region 3255) are not identical
Warning: Note: First and last point of polygon 46 (region 3256) are not identical
Warning: Note: First and last point of polygon 52 (region 3355) are not identical
Warning: Note: First and last point of polygon 53 (region 3356) are not identical
Warning: Note: First and last point of polygon 54 (region 3357) are not identical
Warning: Note: First and last point of polygon 57 (region 3360) are not identical
Warning: Note: First and last point of polygon 61 (region 3403) are not identical
Warning: Note: First and last point of polygon 63 (region 3405) are not identical
Warning: Note: First and last point of polygon 64 (region 3451) are not identical
Warning: Note: First and last point of polygon 66 (region 3452) are not identical
Warning: Note: First and last point of polygon 68 (region 3452) are not identical
Warning: Note: First and last point of polygon 70 (region 3453) are not identical
Warning: Note: First and last point of polygon 73 (region 3455) are not identical
Warning: Note: First and last point of polygon 74 (region 3456) are not identical
Warning: Note: First and last point of polygon 77 (region 3458) are not identical
 finished
> 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)
Error in rgeos::gUnaryUnion(spgeom = SpP, id = IDs) : 
  TopologyException: Input geom 0 is invalid: Self-intersection at or near point 2843 7093 at 2843 7093
Calls: fuse -> <Anonymous> -> <Anonymous>
Execution halted