- using R Under development (unstable) (2025-03-27 r88064)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
- running under: Fedora Linux 40 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘spcosa/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘spcosa’ version ‘0.4-2’
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘spcosa’ can be installed ... [19s/43s] OK
See the install log for details.
- checking package directory ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking whether startup messages can be suppressed ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [16s/24s] OK
- checking Rd files ... NOTE
checkRd: (-1) NEWS.Rd:137: Escaped LaTeX specials: \&
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [8s/34s] ERROR
Running examples in ‘spcosa-Ex.R’ failed
The error most likely occurred in:
> ### Name: estimate-methods
> ### Title: Estimating Statistics
> ### Aliases: estimate-methods estimate
> ### estimate,character,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### estimate,character,CompactStratificationEqualArea,SamplingPatternRandomComposite,data.frame-method
> ### estimate,SamplingVariance,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### estimate,SamplingVariance,CompactStratificationEqualArea,SamplingPatternRandomComposite,data.frame-method
> ### estimate,SpatialCumulativeDistributionFunction,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### estimate,SpatialMean,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### estimate,SpatialMean,CompactStratificationEqualArea,SamplingPatternRandomComposite,data.frame-method
> ### estimate,SpatialVariance,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### estimate,StandardError,CompactStratification,SamplingPatternRandomSamplingUnits,data.frame-method
> ### Keywords: methods
>
> ### ** Examples
>
>
> # Note: the example below requires the 'sf'-package.
> if (require(sf)) {
+ # read vector representation of the "Mijdrecht" area
+ shp <- as(st_read(
+ dsn = system.file("maps", package = "spcosa"),
+ layer = "mijdrecht"), "Spatial")
+
+ # stratify into 30 strata
+ myStratification <- stratify(shp, nStrata = 30, nTry = 10, verbose = TRUE)
+
+ # random sampling of two sampling units per stratum
+ mySamplingPattern <- spsample(myStratification, n = 2)
+
+ # plot sampling pattern
+ plot(myStratification, mySamplingPattern)
+
+ # simulate data
+ # (in real world cases these data have to be obtained by field work etc.)
+ myData <- as(mySamplingPattern, "data.frame")
+ myData$observation <- rnorm(n = nrow(myData), mean = 10, sd = 1)
+
+ # design-based inference
+ estimate("spatial mean", myStratification, mySamplingPattern, myData["observation"])
+ estimate("sampling variance", myStratification, mySamplingPattern, myData["observation"])
+ estimate("standard error", myStratification, mySamplingPattern, myData["observation"])
+ estimate("spatial variance", myStratification, mySamplingPattern, myData["observation"])
+ estimate("scdf", myStratification, mySamplingPattern, myData["observation"])
+ }
Loading required package: sf
Linking to GEOS 3.12.2, GDAL 3.8.5, PROJ 9.3.1; sf_use_s2() is TRUE
Reading layer `mijdrecht' from data source
`/data/gannet/ripley/R/packages/tests-devel/spcosa.Rcheck/spcosa/maps'
using driver `ESRI Shapefile'
Simple feature collection with 1 feature and 2 fields
Geometry type: POLYGON
Dimension: XY
Bounding box: xmin: 115796.2 ymin: 463380.5 xmax: 121670.8 ymax: 471524.6
CRS: NA
2025-03-27 15:16:29 | optimizing configuration 1
2025-03-27 15:16:30 | current objective function value: 50485.85
2025-03-27 15:16:30 | minimum objective function value: 50485.85
2025-03-27 15:16:30 | optimizing configuration 2
[gannet:20490:0:20490] Caught signal 11 (Segmentation fault: invalid permissions for mapped object at address 0x7f0e397dd000)
==== backtrace (tid: 20490) ====
0 /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7f0d7f269144]
1 /lib64/libucs.so.0(+0x2880d) [0x7f0d7f26a80d]
2 /lib64/libucs.so.0(+0x289dd) [0x7f0d7f26a9dd]
3 [0x7f0e17bba2d2]
=================================
*** caught segfault ***
address 0x4d20000500a, cause 'unknown'
Traceback:
1: .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, .jcast(if (inherits(o, "jobjRef") || inherits(o, "jarrayRef")) o else cl, "java/lang/Object"), .jnew("java/lang/String", method), j_p, j_pc, use.true.class = TRUE, evalString = simplify, evalArray = FALSE)
2: .jrcall(x, name, ...)
3: p$optimize()
4: .local(object, ...)
5: stratify(object = object, nStrata = nStrata, priorPoints = priorPoints, maxIterations = maxIterations, nTry = nTry, equalArea = equalArea, verbose = verbose)
6: stratify(object = object, nStrata = nStrata, priorPoints = priorPoints, maxIterations = maxIterations, nTry = nTry, equalArea = equalArea, verbose = verbose)
7: .local(object, ...)
8: stratify(shp, nStrata = 30, nTry = 10, verbose = TRUE)
9: stratify(shp, nStrata = 30, nTry = 10, verbose = TRUE)
An irrecoverable exception occurred. R is aborting now ...
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [63s/73s] OK
Running ‘runTestSuite.R’ [62s/72s]
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [57s/82s] ERROR
Error(s) in re-building vignettes:
--- re-building ‘spcosa.Rmd’ using rmarkdown
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
Using optipng is skipped as output is variable
[gannet:27616:0:27616] Caught signal 11 (Segmentation fault: address not mapped to object at address 0xc)
==== backtrace (tid: 27616) ====
0 /lib64/libucs.so.0(ucs_handle_error+0x2e4) [0x7f0d41058144]
1 /lib64/libucs.so.0(+0x2880d) [0x7f0d4105980d]
2 /lib64/libucs.so.0(+0x289dd) [0x7f0d410599dd]
3 [0x7f0e0b1d23e9]
=================================
*** caught segfault ***
address 0x4d200006be0, cause 'unknown'
Traceback:
1: .jcall("RJavaTools", "Ljava/lang/Object;", "newInstance", class, .jarray(p, "java/lang/Object", dispatch = FALSE), .jarray(pc, "java/lang/Class", dispatch = FALSE), evalString = FALSE, evalArray = FALSE, use.true.class = TRUE)
2: .J(Class, ...)
3: new(J("partition/CompactSpatialPartitionSwop"), cellCenters, .jarray(as(sample(x = rep(x = 0:(nStrata - 1), length = nCells)), "integer")))
4: new(J("partition/CompactSpatialPartitionSwop"), cellCenters, .jarray(as(sample(x = rep(x = 0:(nStrata - 1), length = nCells)), "integer")))
5: .local(object, ...)
6: stratify(object = object, nStrata = nStrata, priorPoints = priorPoints, maxIterations = maxIterations, nTry = nTry, equalArea = equalArea, verbose = verbose)
7: stratify(object = object, nStrata = nStrata, priorPoints = priorPoints, maxIterations = maxIterations, nTry = nTry, equalArea = equalArea, verbose = verbose)
8: .local(object, ...)
9: stratify(shp_farmsum, nStrata = 20, equalArea = TRUE, nTry = 10)
10: stratify(shp_farmsum, nStrata = 20, equalArea = TRUE, nTry = 10)
11: eval(expr, envir)
12: eval(expr, envir)
13: withVisible(eval(expr, envir))
14: withCallingHandlers(code, message = function (cnd) { watcher$capture_plot_and_output() if (on_message$capture) { watcher$push(cnd) } if (on_message$silence) { invokeRestart("muffleMessage") }}, warning = function (cnd) { if (getOption("warn") >= 2 || getOption("warn") < 0) { return() } watcher$capture_plot_and_output() if (on_warning$capture) { cnd <- sanitize_call(cnd) watcher$push(cnd) } if (on_warning$silence) { invokeRestart("muffleWarning") }}, error = function (cnd) { watcher$capture_plot_and_output() cnd <- sanitize_call(cnd) watcher$push(cnd) switch(on_error, continue = invokeRestart("eval_continue"), stop = invokeRestart("eval_stop"), error = NULL)})
15: eval(call)
16: eval(call)
17: with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers)
18: doWithOneRestart(return(expr), restart)
19: withOneRestart(expr, restarts[[1L]])
20: withRestartList(expr, restarts[-nr])
21: doWithOneRestart(return(expr), restart)
22: withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
23: withRestartList(expr, restarts)
24: withRestarts(with_handlers({ for (expr in tle$exprs) { ev <- withVisible(eval(expr, envir)) watcher$capture_plot_and_output() watcher$print_value(ev$value, ev$visible, envir) } TRUE}, handlers), eval_continue = function() TRUE, eval_stop = function() FALSE)
25: evaluate::evaluate(...)
26: evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options))
27: in_dir(input_dir(), expr)
28: in_input_dir(evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, keep_message = if (is.numeric(options$message)) TRUE else options$message, stop_on_error = if (is.numeric(options$error)) options$error else { if (options$error && options$include) 0L else 2L }, output_handler = knit_handlers(options$render, options)))
29: eng_r(options)
30: block_exec(params)
31: call_block(x)
32: process_group(group)
33: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } })
34: xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), error = function(e) { if (progress && is.function(pb$interrupt)) pb$interrupt() if (xfun::pkg_available("rlang", "1.0.0")) { if (is_R_CMD_build() || is_R_CMD_check()) { cnd = tryCatch(rlang::entrace(e), error = identity) error <<- format(cnd) } else { rlang::entrace(e) } } }), function(loc) { setwd(wd) write_utf8(res, output %n% stdout()) paste0("\nQuitting from ", loc, if (!is.null(error)) paste0("\n", rule(), error, "\n", rule()))}, if (labels[i] != "") sprintf(" [%s]", labels[i]), get_loc)
35: process_file(text, output)
36: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
37: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv(), output_dir = getwd(), ...)
38: vweave_rmarkdown(...)
39: engine$weave(file, quiet = quiet, encoding = enc)
40: doTryCatch(return(expr), name, parentenv, handler)
41: tryCatchOne(expr, names, parentenv, handlers[[1L]])
42: tryCatchList(expr, classes, parentenv, handlers)
43: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) output <- find_vignette_product(name, by = "weave", engine = engine) if (!have.makefile && vignette_is_tex(output)) { texi2pdf(file = output, clean = FALSE, quiet = quiet) output <- find_vignette_product(name, by = "texi2pdf", engine = engine) } outputs <- c(outputs, output)}, error = function(e) { thisOK <<- FALSE fails <<- c(fails, file) message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)))})
44: tools::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/spcosa.Rcheck/vign_test/spcosa", skip = TRUE, ser_elibs = "/tmp/RtmpyF61ds/file2b4d5b33f601.rds")
An irrecoverable exception occurred. R is aborting now ...
- checking PDF version of manual ... OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 2 ERRORs, 1 NOTE