* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/AgePopDenom.Rcheck’ * using R Under development (unstable) (2025-06-30 r88364) * 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 * checking for file ‘AgePopDenom/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘AgePopDenom’ version ‘0.4.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... INFO Package suggested but not available for checking: ‘automap’ * 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 ‘AgePopDenom’ can be installed ... 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 ... 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 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 ... OK * checking Rd files ... OK * 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 ... OK * checking examples with --run-donttest ... [37s/38s] ERROR Running examples in ‘AgePopDenom-Ex.R’ failed The error most likely occurred in: > ### Name: fit_spatial_model > ### Title: Fit a Spatial Model for Age Parameters using TMB > ### Aliases: fit_spatial_model > > ### ** Examples > > > ## No test: > set.seed(123) > # Set parameters for simulation > total_population <- 266 > urban_proportion <- 0.602 > total_coords <- 266 > lon_range <- c(-16.802, -13.849) > lat_range <- c(13.149, 13.801) > mean_web_x <- -1764351 > mean_web_y <- 1510868 > > # Simulate processed survey dataset for Gambia > df_gambia <- NULL > df_gambia$age_param_data <- dplyr::tibble( + country = "Gambia", + country_code_iso3 = "GMB", + country_code_dhs = "GM", + year_of_survey = 2024, + id_coords = rep(1:total_coords, length.out = total_population), + lon = runif(total_population, lon_range[1], lon_range[2]), + lat = runif(total_population, lat_range[1], lat_range[2]), + web_x = rnorm(total_population, mean_web_x, 50000), + web_y = rnorm(total_population, mean_web_y, 50000), + log_scale = rnorm(total_population, 2.82, 0.2), + log_shape = rnorm(total_population, 0.331, 0.1), + urban = rep(c(1, 0), c( + round(total_population * urban_proportion), + total_population - round(total_population * urban_proportion) + )), + b1 = rnorm(total_population, 0.0142, 0.002), + c = rnorm(total_population, -0.00997, 0.001), + b2 = rnorm(total_population, 0.00997, 0.002), + nsampled = sample(180:220, total_population, replace = TRUE) + ) > > > tf <- file.path(tempdir(), "test_env") > dir.create(tf, recursive = TRUE, showWarnings = FALSE) > > #initialise files and key scripts > init( + r_script_name = "full_pipeline.R", + cpp_script_name = "model.cpp", + path = tf, + open_r_script = FALSE + ) ── Package Installation Required ── The following packages are missing: 1. automap ! Non-interactive session detected. Skipping package installation. ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/01_data/1a_survey_data/processed ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/01_data/1a_survey_data/raw ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/01_data/1b_rasters/urban_extent ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/01_data/1b_rasters/pop_raster ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/01_data/1c_shapefiles ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/02_scripts ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/03_outputs/3a_model_outputs ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/03_outputs/3b_visualizations ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/03_outputs/3c_table_outputs ! Exists: /tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/03_outputs/3d_compiled_results ✔ Folder structure created successfully. ℹ R script created but could not open automatically: RStudio not available. ✔ C++ script '/tmp/RtmpX8nefG/working_dir/RtmpPbGj08/test_env/02_scripts/model.cpp' successfully created. > > mod <- fit_spatial_model( + df_gambia$age_param_data, + scale_outcome = "log_scale", + shape_outcome = "log_shape", + covariates = "urban", + cpp_script_name = file.path(tf, "02_scripts/model"), + country_code = "GMB", + output_dir = file.path(tf, "03_outputs/3a_model_outputs") + ) ℹ Fitting initial linear models... ✔ Fitted initial linear models. ℹ Calculating empirical variogram... Error in fit_spatial_model(df_gambia$age_param_data, scale_outcome = "log_scale", : Package 'automap' is required for variogram fitting. ✖ Calculating empirical variogram... ... failed Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/AgePopDenom.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:11.15, 84.78 + 44.01