Running ‘testsAtoC.R’ [3s/3s]
  Running ‘testsD.R’ [15s/15s]
  Running ‘testsEtoF.R’ [10s/10s]
  Running ‘testsGtoJ.R’ [2s/2s]
  Running ‘testsK.R’ [3s/3s]
Running the tests in ‘tests/testsK.R’ failed.
Last 13 lines of output:
   6: eval(cmd)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  11: try(eval(cmd))
  12: simulate.kppm(fit0, saveLambda = TRUE)
  13: simulate(fit0, saveLambda = TRUE)
  14: eval(quote({    fit <- kppm(redwood ~ 1, "Thomas")    fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE)    if (FULLTEST) {        fitx <- update(fit, ~. + x)        fitM <- update(fit, clusters = "MatClust")        fitC <- update(fit, cells)        fitCx <- update(fit, cells ~ x)        Wsub <- owin(c(0, 0.5), c(-0.5, 0))        Zsub <- (bdist.pixels(Window(redwood)) > 0.1)        fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub)        fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub)        fitWsub        ff <- as.fv(fitx)        uu <- unitname(fitx)        unitname(fitCx) <- "furlong"        mo <- model.images(fitCx)        p <- psib(fit)        px <- psib(fitx)    }    if (ALWAYS) {        Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]]    }    if (FULLTEST) {        vc <- vcov(fitx)        vc2 <- vcov(fitx, fast = TRUE)        vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE)        vc4 <- vcov(fitx, splitup = TRUE)        a <- varcount(fitx, function(x, y) {            x + 1        })        a <- varcount(fitx, function(x, y) {            y - 1        })        a <- varcount(fitx, function(x, y) {            x + y        })        fitI <- update(fit, improve.type = "quasi")        fitxI <- update(fitx, improve.type = "quasi")        fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE)        vcI <- vcov(fitxI)    }    if (ALWAYS) {        fitMC <- kppm(redwood ~ x, "Thomas")        plot(fitMC)    }    if (FULLTEST) {        fitCL <- kppm(redwood ~ x, "Thomas", method = "c")        fitPA <- kppm(redwood ~ x, "Thomas", method = "p")        plot(fitCL)        plot(fitPA)        fut <- kppm(redwood ~ x, "VarGamma", method = "clik2",             nu.ker = -3/8)        kfut <- as.fv(fut)    }    if (require(RandomFields)) {        fit0 <- kppm(redwood ~ 1, "LGCP")        is.poisson(fit0)        Y0 <- simulate(fit0, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y0))        p0 <- psib(fit0)        if (FULLTEST) {            fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",                 nu = 0.3), control = list(maxit = 3))            Y1 <- simulate(fit1, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1))        }        fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1p))        if (FULLTEST) {            fit1pClik <- update(fit1p, method = "clik")            fit1pPalm <- update(fit1p, method = "palm")        }        xx <- as.im(function(x, y) x, Window(redwood))        fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx))        Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1xx))        if (FULLTEST) {            fit1xxVG <- update(fit1xx, clusters = "VarGamma",                 nu = -1/4)            Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1xxVG))        }        fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE)        stopifnot(is.ppp(Y1xxLG))        if (FULLTEST) {            fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K")            Y2 <- simulate(fit2, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y2))        }        kraever("RandomFields")    }}), new.env())
  15: eval(quote({    fit <- kppm(redwood ~ 1, "Thomas")    fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE)    if (FULLTEST) {        fitx <- update(fit, ~. + x)        fitM <- update(fit, clusters = "MatClust")        fitC <- update(fit, cells)        fitCx <- update(fit, cells ~ x)        Wsub <- owin(c(0, 0.5), c(-0.5, 0))        Zsub <- (bdist.pixels(Window(redwood)) > 0.1)        fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub)        fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub)        fitWsub        ff <- as.fv(fitx)        uu <- unitname(fitx)        unitname(fitCx) <- "furlong"        mo <- model.images(fitCx)        p <- psib(fit)        px <- psib(fitx)    }    if (ALWAYS) {        Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]]    }    if (FULLTEST) {        vc <- vcov(fitx)        vc2 <- vcov(fitx, fast = TRUE)        vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE)        vc4 <- vcov(fitx, splitup = TRUE)        a <- varcount(fitx, function(x, y) {            x + 1        })        a <- varcount(fitx, function(x, y) {            y - 1        })        a <- varcount(fitx, function(x, y) {            x + y        })        fitI <- update(fit, improve.type = "quasi")        fitxI <- update(fitx, improve.type = "quasi")        fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE)        vcI <- vcov(fitxI)    }    if (ALWAYS) {        fitMC <- kppm(redwood ~ x, "Thomas")        plot(fitMC)    }    if (FULLTEST) {        fitCL <- kppm(redwood ~ x, "Thomas", method = "c")        fitPA <- kppm(redwood ~ x, "Thomas", method = "p")        plot(fitCL)        plot(fitPA)        fut <- kppm(redwood ~ x, "VarGamma", method = "clik2",             nu.ker = -3/8)        kfut <- as.fv(fut)    }    if (require(RandomFields)) {        fit0 <- kppm(redwood ~ 1, "LGCP")        is.poisson(fit0)        Y0 <- simulate(fit0, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y0))        p0 <- psib(fit0)        if (FULLTEST) {            fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",                 nu = 0.3), control = list(maxit = 3))            Y1 <- simulate(fit1, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1))        }        fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1p))        if (FULLTEST) {            fit1pClik <- update(fit1p, method = "clik")            fit1pPalm <- update(fit1p, method = "palm")        }        xx <- as.im(function(x, y) x, Window(redwood))        fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx))        Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1xx))        if (FULLTEST) {            fit1xxVG <- update(fit1xx, clusters = "VarGamma",                 nu = -1/4)            Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1xxVG))        }        fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE)        stopifnot(is.ppp(Y1xxLG))        if (FULLTEST) {            fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K")            Y2 <- simulate(fit2, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y2))        }        kraever("RandomFields")    }}), new.env())
  16: eval(expr, p)
  17: eval(expr, p)
  18: eval.parent(substitute(eval(quote(expr), envir)))
  19: local({    fit <- kppm(redwood ~ 1, "Thomas")    fitx <- kppm(redwood ~ x, "Thomas", verbose = TRUE)    if (FULLTEST) {        fitx <- update(fit, ~. + x)        fitM <- update(fit, clusters = "MatClust")        fitC <- update(fit, cells)        fitCx <- update(fit, cells ~ x)        Wsub <- owin(c(0, 0.5), c(-0.5, 0))        Zsub <- (bdist.pixels(Window(redwood)) > 0.1)        fitWsub <- kppm(redwood ~ 1, "Thomas", subset = Wsub)        fitZsub <- kppm(redwood ~ 1, "Thomas", subset = Zsub)        fitWsub        ff <- as.fv(fitx)        uu <- unitname(fitx)        unitname(fitCx) <- "furlong"        mo <- model.images(fitCx)        p <- psib(fit)        px <- psib(fitx)    }    if (ALWAYS) {        Y <- simulate(fitx, seed = 42, saveLambda = TRUE)[[1]]    }    if (FULLTEST) {        vc <- vcov(fitx)        vc2 <- vcov(fitx, fast = TRUE)        vc3 <- vcov(fitx, fast = TRUE, splitup = TRUE)        vc4 <- vcov(fitx, splitup = TRUE)        a <- varcount(fitx, function(x, y) {            x + 1        })        a <- varcount(fitx, function(x, y) {            y - 1        })        a <- varcount(fitx, function(x, y) {            x + y        })        fitI <- update(fit, improve.type = "quasi")        fitxI <- update(fitx, improve.type = "quasi")        fitxIs <- update(fitx, improve.type = "quasi", fast = FALSE)        vcI <- vcov(fitxI)    }    if (ALWAYS) {        fitMC <- kppm(redwood ~ x, "Thomas")        plot(fitMC)    }    if (FULLTEST) {        fitCL <- kppm(redwood ~ x, "Thomas", method = "c")        fitPA <- kppm(redwood ~ x, "Thomas", method = "p")        plot(fitCL)        plot(fitPA)        fut <- kppm(redwood ~ x, "VarGamma", method = "clik2",             nu.ker = -3/8)        kfut <- as.fv(fut)    }    if (require(RandomFields)) {        fit0 <- kppm(redwood ~ 1, "LGCP")        is.poisson(fit0)        Y0 <- simulate(fit0, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y0))        p0 <- psib(fit0)        if (FULLTEST) {            fit1 <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",                 nu = 0.3), control = list(maxit = 3))            Y1 <- simulate(fit1, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1))        }        fit1p <- kppm(redwood ~ x, "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1p <- simulate(fit1p, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1p))        if (FULLTEST) {            fit1pClik <- update(fit1p, method = "clik")            fit1pPalm <- update(fit1p, method = "palm")        }        xx <- as.im(function(x, y) x, Window(redwood))        fit1xx <- update(fit1p, . ~ xx, data = solist(xx = xx))        Y1xx <- simulate(fit1xx, saveLambda = TRUE)[[1]]        stopifnot(is.ppp(Y1xx))        if (FULLTEST) {            fit1xxVG <- update(fit1xx, clusters = "VarGamma",                 nu = -1/4)            Y1xxVG <- simulate(fit1xxVG, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y1xxVG))        }        fit1xxLG <- update(fit1xx, clusters = "LGCP", covmodel = list(model = "matern",             nu = 0.3), statistic = "pcf")        Y1xxLG <- simulate(fit1xxLG, saveLambda = TRUE, drop = TRUE)        stopifnot(is.ppp(Y1xxLG))        if (FULLTEST) {            fit2 <- kppm(redwood ~ x, cluster = "Cauchy", statistic = "K")            Y2 <- simulate(fit2, saveLambda = TRUE)[[1]]            stopifnot(is.ppp(Y2))        }        kraever("RandomFields")    }})
  An irrecoverable exception occurred. R is aborting now ...