* using log directory 'd:/Rcompile/CRANpkg/local/4.4/rgeomorphon.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 'rgeomorphon/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'rgeomorphon' version '0.3.0' * 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 'rgeomorphon' 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 ... [0s] 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 whether startup messages can be suppressed ... [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 ... [3s] 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 ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... 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 ... [7s] ERROR Running examples in 'rgeomorphon-Ex.R' failed The error most likely occurred in: > ### Name: forms_matrix > ### Title: Create a 'forms_matrix' object > ### Aliases: forms_matrix get_forms_grass_enum > > ### ** Examples > > ## Don't show: > if (requireNamespace("terra")) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf + ## End(Don't show) + + library(terra) + library(rgeomorphon) + + # default values + x <- forms_matrix_get(num_forms = 10, levels = get_forms_grass_enum()) + + # inspect + x + + # create a 9-class system where PEAK is combined with RIDGE + x[x == 2] <- 3 + a <- get_forms_grass_enum() + a <- a[!names(a) == "G_PK"] + + # create a forms matrix with custom levels + fm <- forms_matrix(x, a) + + # run geomorphon algorithm + SEARCH = 7 # outer search radius (cells) + SKIP = 1 # inner skip radius (cells) + DIST = 0 # flatness distance (cells) + FLAT = 1 # flat angle threshold + MODE = "anglev1" # comparison mode + + ## classic volcano + data("volcano", package = "datasets") + dem <- terra::rast(volcano) + terra::crs(dem) <- terra::crs("EPSG:2193") + terra::ext(dem) <- c(1756968, 1757578, 5917000, 5917870) + names(dem) <- "elevation" + + # include original forms, positive, and negative output + res <- geomorphons( + dem, + search = SEARCH, + skip = SKIP, + dist = DIST, + flat = FLAT, + comparison_mode = MODE, + forms = TRUE, + positive = TRUE, + negative = TRUE + ) + + # apply custom classification to positive and negative + res2 <- geomorphon_theme( + forms_matrix_apply( + x = res[[c("positive", "negative")]], + rcl = fm + ) + ) + + # compare with default + terra::plot(terra::rast(c(`10 form`=res$forms, `9 form`=res2))) + ## Don't show: + }) # examplesIf Loading required namespace: terra > library(terra) terra 1.8.86 > library(rgeomorphon) > x <- forms_matrix_get(num_forms = 10, levels = get_forms_grass_enum()) > x object pos=0 pos=1 pos=2 pos=3 pos=4 pos=5 pos=6 pos=7 pos=8 neg=0 G_FL G_FL G_FL G_FS G_FS G_VL G_VL G_VL G_PT neg=1 G_FL G_FL G_FS G_FS G_FS G_VL G_VL G_VL G_NONE neg=2 G_FL G_SH G_SL G_SL G_HL G_HL G_VL G_NONE G_NONE neg=3 G_SH G_SH G_SL G_SL G_SL G_HL G_NONE G_NONE G_NONE neg=4 G_SH G_SH G_SP G_SL G_SL G_NONE G_NONE G_NONE G_NONE neg=5 G_RI G_RI G_SP G_SP G_NONE G_NONE G_NONE G_NONE G_NONE neg=6 G_RI G_RI G_RI G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE neg=7 G_RI G_RI G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE neg=8 G_PK G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE G_NONE > x[x == 2] <- 3 > a <- get_forms_grass_enum() > a <- a[!names(a) == "G_PK"] > fm <- forms_matrix(x, a) > SEARCH = 7 > SKIP = 1 > DIST = 0 > FLAT = 1 > MODE = "anglev1" > data("volcano", package = "datasets") > dem <- terra::rast(volcano) > terra::crs(dem) <- terra::crs("EPSG:2193") Warning: PROJ: proj_create_from_database: Cannot find proj.db (GDAL error 1) Error: [rast] empty srs Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [8s] ERROR Running 'tinytest.R' [7s] Running the tests in 'tests/tinytest.R' failed. Complete output: > > if ( requireNamespace("tinytest", quietly=TRUE) ){ + tinytest::test_package("rgeomorphon") + } test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 0 tests test_rgeomorphon.R............ 1 tests OK Error: [rast] empty srs In addition: Warning message: PROJ: proj_create_from_database: Cannot find proj.db (GDAL error 1) Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [1s] OK * checking PDF version of manual ... [17s] OK * checking HTML version of manual ... [2s] OK * DONE Status: 2 ERRORs