Running 'reg-tests.R' [1s]
Running the tests in 'tests/reg-tests.R' failed.
Complete output:
  > suppressMessages(library(gpclib))
  > 
  > ## Make some random polygons
  > set.seed(100)
  > a <- cbind(rnorm(100), rnorm(100))
  > a <- a[chull(a), ]
  > 
  > ## Convert `a' from matrix to "gpc.poly"
  > a <- as(a, "gpc.poly")
  > show(a)
  GPC Polygon
     Num. Contours:  1 
     Num. Vertices:  9 
     BBox (X):  -2.271925 --> 2.581959 
     BBox (Y):  -2.136494 --> 2.1686 
  > 
  > b <- cbind(rnorm(100), rnorm(100))
  > b <- as(b[chull(b), ], "gpc.poly")
  > show(b)
  GPC Polygon
     Num. Contours:  1 
     Num. Vertices:  9 
     BBox (X):  -3.020814 --> 2.727888 
     BBox (Y):  -2.676379 --> 3.304151 
  > 
  > ## More complex polygons with an intersection
  > p1 <- read.polyfile(system.file("poly-ex/ex-poly1.txt", package = "gpclib"))
  > p2 <- read.polyfile(system.file("poly-ex/ex-poly2.txt", package = "gpclib"))
  > 
  > ## Plot both polygons and highlight their intersection in red
  > plot(app <- append.poly(p1, p2))
  > show(app)
  GPC Polygon
     Num. Contours:  2 
     BBox (X):  316.1636 --> 319.2698 
     BBox (Y):  91.66837 --> 93.8952 
  > plot(int <- intersect(p1, p2), poly.args = list(col = 2), add = TRUE)
  > show(int)
  GPC Polygon
     Num. Contours:  2 
     BBox (X):  317.0437 --> 318.0591 
     BBox (Y):  91.81092 --> 93.14354 
  > 
  > ## Highlight the difference p1 \ p2 in green
  > plot(sdif <- setdiff(p1, p2), poly.args = list(col = 3), add = TRUE)
  > show(sdif)
  GPC Polygon
     Num. Contours:  1 
     Num. Vertices:  112 
     BBox (X):  316.1636 --> 317.9963 
     BBox (Y):  91.66837 --> 93.8952 
  > 
  > ## Highlight the difference p2 \ p1 in blue
  > plot(sdif <- setdiff(p2, p1), poly.args = list(col = 4), add = TRUE)
  > str(sdif)
  Formal class 'gpc.poly' [package "gpclib"] with 1 slot
    ..@ pts:List of 1
    .. ..$ :List of 3
    .. .. ..$ x   : num [1:71] 319 319 319 319 319 ...
    .. .. ..$ y   : num [1:71] 93.3 93.2 93 92.9 92.8 ...
    .. .. ..$ hole: logi FALSE
  > 
  > ## Plot the union of the two polygons
  > plot(un <- union(p1, p2))
  Error in h(simpleError(msg, call)) : 
    error in evaluating the argument 'x' in selecting a method for function 'plot': DLL requires the use of native symbols
  Calls: plot -> union -> union -> .handleSimpleError -> h
  Execution halted