Running examples in ‘polyCub-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: coerce-gpc-methods
> ### Title: Conversion between polygonal '"owin"' and '"gpc.poly"'
> ### Aliases: coerce-gpc-methods owin2gpc gpc2owin as.owin.gpc.poly
> ### Keywords: methods spatial
> 
> ### ** Examples
> 
> if (gpclibPermit() && require("spatstat")) {
+     ## use example polygons from
+     example(plotpolyf, ask = FALSE)
+ 
+     letterR  # a simple "xylist"
+     letterR.owin <- owin(poly = letterR)
+     letterR.gpc_from_owin <- owin2gpc(letterR.owin)
+     letterR.xylist_from_gpc <- xylist(letterR.gpc_from_owin)
+     stopifnot(all.equal(letterR, lapply(letterR.xylist_from_gpc, "[", 1:2)))
+     letterR.owin_from_gpc <- as.owin(letterR.gpc_from_owin)
+     stopifnot(all.equal(letterR.owin, letterR.owin_from_gpc))
+ }
Loading required package: spatstat
Loading required package: spatstat.data
Loading required package: nlme
Loading required package: rpart

spatstat 1.59-0       (nickname: ‘J'ai omis les oeufs de caille’) 
For an introduction to spatstat, type ‘beginner’ 


pltply> ### a polygonal domain (a rounded version of spatstat.data::letterR$bdry)
pltply> letterR <- list(
pltply+     list(x = c(3.9, 3.8, 3.7, 3.5, 3.4, 3.5, 3.7, 3.8, 3.8, 3.7,
pltply+                3.7, 3.5, 3.3, 2, 2, 2.7, 2.7, 2.9, 3, 3.3, 3.9),
pltply+          y = c(0.7, 1.1, 1.3, 1.7, 1.8, 1.9, 2.1, 2.3, 2.5, 2.8, 3,
pltply+                3.2, 3.3, 3.3, 0.7, 0.7, 1.7, 1.7, 1.5, 0.7, 0.6)),
pltply+     list(x = c(2.6, 2.6, 3, 3.1, 3.2, 3.1, 3.1, 3),
pltply+          y = c(2.2, 2.7, 2.7, 2.6, 2.5, 2.4, 2.3, 2.2))
pltply+ )

pltply> ### f: isotropic exponential decay
pltply> fr <- function(r, rate = 1) dexp(r, rate = rate)

pltply> fcenter <- c(2,3)

pltply> f <- function (s, rate = 1) fr(sqrt(rowSums(t(t(s)-fcenter)^2)), rate = rate)

pltply> ### plot
pltply> plotpolyf(letterR, f, use.lattice = FALSE)

pltply> plotpolyf(letterR, f, use.lattice = TRUE)
Error: Can't interpret W as a window
Execution halted