* using log directory 'd:/Rcompile/CRANpkg/local/4.4/flexurba.Rcheck' * using R version 4.4.3 (2025-02-28 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'flexurba/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'flexurba' version '0.2.2' * package encoding: UTF-8 * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'flexurba' can be installed ... OK * used C++ compiler: 'g++.exe (GCC) 13.3.0' * checking installed package size ... OK * 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 ... [1s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [1s] 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 ... [8s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... [1s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [8s] ERROR Running examples in 'flexurba-Ex.R' failed The error most likely occurred in: > ### Name: DoU_classify_grid > ### Title: Create the DEGURBA grid cell classification > ### Aliases: DoU_classify_grid > > ### ** Examples > > # load the data > data_belgium <- DoU_load_grid_data_belgium() Warning: PROJ: proj_get_authorities_from_database: Cannot find proj.db (GDAL error 1) Error: [rast] empty srs Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [42s] ERROR Running 'spelling.R' [0s] Running 'testthat.R' [41s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(flexurba) > > test_check("flexurba") Saving _problems/test-classify-grid-112.R Saving _problems/test-classify-grid-330.R Saving _problems/test-classify-grid-770.R Saving _problems/test-classify-grid-864.R Saving _problems/test-classify-grid-941.R Saving _problems/test-classify-grid-1075.R Saving _problems/test-classify-units-8.R Saving _problems/test-fill-gaps-17.R Saving _problems/test-get-optimal-builtup-12.R Saving _problems/test-load-grid-data-belgium-4.R Saving _problems/test-plot-grid-6.R Saving _problems/test-plot-units-6.R [ FAIL 12 | WARN 22 | SKIP 0 | PASS 79 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-classify-grid.R:55:3'): DoU_classify_grid() works ────────────── Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'values': [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-classify-grid.R:55:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─terra::values(...) 5. ├─flexurba::DoU_classify_grid(...) 6. │ └─flexurba::DoU_preprocess_grid(data) 7. │ ├─terra::crs("ESRI:54009", proj = TRUE) 8. │ └─terra::crs("ESRI:54009", proj = TRUE) 9. │ └─terra (local) .local(x, ...) 10. │ ├─terra::rast(crs = x) 11. │ └─terra::rast(crs = x) 12. │ └─terra (local) .local(x = x, ...) 13. │ └─terra:::new_rast(...) 14. │ └─terra:::messages(r, "rast") 15. │ └─terra:::error(f, x@pntr$getError()) 16. │ └─base::stop("[", f, "] ", emsg, ..., call. = FALSE) 17. └─base::.handleSimpleError(``, "[rast] empty srs", base::quote(NULL)) 18. └─base (local) h(simpleError(msg, call)) ── Error ('test-classify-grid.R:270:3'): DoU_classify_grid() works prt2 ──────── Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'values': [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-classify-grid.R:270:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─terra::values(...) 5. ├─flexurba::DoU_classify_grid(...) 6. │ └─flexurba::DoU_preprocess_grid(data) 7. │ ├─terra::crs("ESRI:54009", proj = TRUE) 8. │ └─terra::crs("ESRI:54009", proj = TRUE) 9. │ └─terra (local) .local(x, ...) 10. │ ├─terra::rast(crs = x) 11. │ └─terra::rast(crs = x) 12. │ └─terra (local) .local(x = x, ...) 13. │ └─terra:::new_rast(...) 14. │ └─terra:::messages(r, "rast") 15. │ └─terra:::error(f, x@pntr$getError()) 16. │ └─base::stop("[", f, "] ", emsg, ..., call. = FALSE) 17. └─base::.handleSimpleError(``, "[rast] empty srs", base::quote(NULL)) 18. └─base (local) h(simpleError(msg, call)) ── Error ('test-classify-grid.R:682:3'): the different parameters work ───────── Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'values': [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-classify-grid.R:682:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─terra::values(...) 5. ├─flexurba::DoU_classify_grid(...) 6. │ └─flexurba::DoU_preprocess_grid(data) 7. │ ├─terra::crs("ESRI:54009", proj = TRUE) 8. │ └─terra::crs("ESRI:54009", proj = TRUE) 9. │ └─terra (local) .local(x, ...) 10. │ ├─terra::rast(crs = x) 11. │ └─terra::rast(crs = x) 12. │ └─terra (local) .local(x = x, ...) 13. │ └─terra:::new_rast(...) 14. │ └─terra:::messages(r, "rast") 15. │ └─terra:::error(f, x@pntr$getError()) 16. │ └─base::stop("[", f, "] ", emsg, ..., call. = FALSE) 17. └─base::.handleSimpleError(``, "[rast] empty srs", base::quote(NULL)) 18. └─base (local) h(simpleError(msg, call)) ── Error ('test-classify-grid.R:855:3'): DoU_classify_grid_water() works ─────── Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'values': [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-classify-grid.R:855:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─... %>% sum 5. ├─terra::values(...) 6. ├─flexurba::DoU_classify_grid_water(...) 7. │ └─flexurba::DoU_preprocess_grid(data) 8. │ ├─terra::crs("ESRI:54009", proj = TRUE) 9. │ └─terra::crs("ESRI:54009", proj = TRUE) 10. │ └─terra (local) .local(x, ...) 11. │ ├─terra::rast(crs = x) 12. │ └─terra::rast(crs = x) 13. │ └─terra (local) .local(x = x, ...) 14. │ └─terra:::new_rast(...) 15. │ └─terra:::messages(r, "rast") 16. │ └─terra:::error(f, x@pntr$getError()) 17. │ └─base::stop("[", f, "] ", emsg, ..., call. = FALSE) 18. └─base::.handleSimpleError(``, "[rast] empty srs", base::quote(NULL)) 19. └─base (local) h(simpleError(msg, call)) ── Error ('test-classify-grid.R:941:3'): the errors are thrown in case of invalid arguments ── Error: [rast] empty srs Backtrace: ▆ 1. └─flexurba::DoU_classify_grid_urban_centres(data) at test-classify-grid.R:941:3 2. └─flexurba::DoU_preprocess_grid(data) 3. ├─terra::crs("ESRI:54009", proj = TRUE) 4. └─terra::crs("ESRI:54009", proj = TRUE) 5. └─terra (local) .local(x, ...) 6. ├─terra::rast(crs = x) 7. └─terra::rast(crs = x) 8. └─terra (local) .local(x = x, ...) 9. └─terra:::new_rast(...) 10. └─terra:::messages(r, "rast") 11. └─terra:::error(f, x@pntr$getError()) ── Failure ('test-classify-grid.R:1065:3'): the depricated functions exist ───── Expected `{ ... }` not to throw any errors. Actually got a with message: [rast] empty srs ── Error ('test-classify-units.R:4:3'): DoU_classify_units() works ───────────── Error: [rast] empty srs Backtrace: ▆ 1. └─flexurba::DoU_classify_grid(...) at test-classify-units.R:4:3 2. └─flexurba::DoU_preprocess_grid(data) 3. ├─terra::crs("ESRI:54009", proj = TRUE) 4. └─terra::crs("ESRI:54009", proj = TRUE) 5. └─terra (local) .local(x, ...) 6. ├─terra::rast(crs = x) 7. └─terra::rast(crs = x) 8. └─terra (local) .local(x = x, ...) 9. └─terra:::new_rast(...) 10. └─terra:::messages(r, "rast") 11. └─terra:::error(f, x@pntr$getError()) ── Error ('test-fill-gaps.R:2:3'): fill_gaps() functions works ───────────────── Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'values': error in evaluating the argument 'x' in selecting a method for function 'as.polygons': [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-fill-gaps.R:2:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─terra::values(...) 5. ├─flexurba::fill_gaps(...) 6. │ ├─terra::as.polygons(x, dissolve = TRUE) %>% sf::st_as_sf() 7. │ └─terra::as.polygons(x, dissolve = TRUE) 8. ├─sf::st_as_sf(.) 9. ├─terra::rast(...) 10. ├─terra::rast(...) 11. │ └─terra (local) .local(x = x, ...) 12. │ └─terra:::new_rast(...) 13. │ └─terra:::messages(r, "rast") 14. │ └─terra:::error(f, x@pntr$getError()) 15. │ └─base::stop("[", f, "] ", emsg, ..., call. = FALSE) 16. ├─base::.handleSimpleError(``, "[rast] empty srs", base::quote(NULL)) 17. │ └─base (local) h(simpleError(msg, call)) 18. └─base::.handleSimpleError(...) 19. └─base (local) h(simpleError(msg, call)) ── Error ('test-get-optimal-builtup.R:2:3'): DoU_get_optimal_builtup() works ─── Error: [rast] empty srs Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-get-optimal-builtup.R:2:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─flexurba::DoU_get_optimal_builtup(...) 5. └─flexurba::DoU_preprocess_grid(data) 6. ├─terra::crs("ESRI:54009", proj = TRUE) 7. └─terra::crs("ESRI:54009", proj = TRUE) 8. └─terra (local) .local(x, ...) 9. ├─terra::rast(crs = x) 10. └─terra::rast(crs = x) 11. └─terra (local) .local(x = x, ...) 12. └─terra:::new_rast(...) 13. └─terra:::messages(r, "rast") 14. └─terra:::error(f, x@pntr$getError()) ── Failure ('test-load-grid-data-belgium.R:2:3'): crop_GHSLdata() works ──────── Expected `load_grid_data_belgium()` not to throw any errors. Actually got a with message: [rast] empty srs ── Error ('test-plot-grid.R:2:3'): DoU_plot_grid() works ─────────────────────── Error: [rast] empty srs Backtrace: ▆ 1. └─flexurba::DoU_classify_grid(...) at test-plot-grid.R:2:3 2. └─flexurba::DoU_preprocess_grid(data) 3. ├─terra::crs("ESRI:54009", proj = TRUE) 4. └─terra::crs("ESRI:54009", proj = TRUE) 5. └─terra (local) .local(x, ...) 6. ├─terra::rast(crs = x) 7. └─terra::rast(crs = x) 8. └─terra (local) .local(x = x, ...) 9. └─terra:::new_rast(...) 10. └─terra:::messages(r, "rast") 11. └─terra:::error(f, x@pntr$getError()) ── Error ('test-plot-units.R:2:3'): DoU_plot_units() works ───────────────────── Error: [rast] empty srs Backtrace: ▆ 1. └─flexurba::DoU_classify_grid(...) at test-plot-units.R:2:3 2. └─flexurba::DoU_preprocess_grid(data) 3. ├─terra::crs("ESRI:54009", proj = TRUE) 4. └─terra::crs("ESRI:54009", proj = TRUE) 5. └─terra (local) .local(x, ...) 6. ├─terra::rast(crs = x) 7. └─terra::rast(crs = x) 8. └─terra (local) .local(x = x, ...) 9. └─terra:::new_rast(...) 10. └─terra:::messages(r, "rast") 11. └─terra:::error(f, x@pntr$getError()) [ FAIL 12 | WARN 22 | SKIP 0 | PASS 79 ] Error: ! Test failures. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [5s] OK * checking PDF version of manual ... [20s] OK * checking HTML version of manual ... [9s] OK * DONE Status: 2 ERRORs