* using log directory 'd:/Rcompile/CRANpkg/local/4.5/o2geosocial.Rcheck' * using R Under development (unstable) (2024-05-30 r86651 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'o2geosocial/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'o2geosocial' version '1.1.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 'o2geosocial' can be installed ... OK * used C++ compiler: 'g++.exe (GCC) 13.2.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 ... [2s] 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 ... [2s] OK * checking loading without being on the library search path ... [2s] OK * checking whether startup messages can be suppressed ... [2s] 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 ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... 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 ... [2s] ERROR Running examples in 'o2geosocial-Ex.R' failed The error most likely occurred in: > ### Name: custom_likelihoods > ### Title: Customise likelihood functions for o2geosocial > ### Aliases: custom_likelihoods print.custom_likelihoods > > ### ** Examples > > > ## specify a null model by disabling all likelihood components > f_null <- function(data, config = NULL, param, i) { + return(0.0) + } > > > null_model <- custom_likelihoods(timing_sampling = f_null, + timing_infections = f_null, + reporting = f_null, + space = f_null, + age = f_null) > > null_config <- list(find_import = FALSE, + n_iter = 200, gamma = 100, delta = 30, + sample_every = 1) > > ## load data > data("toy_outbreak_short") > dt_cases <- toy_outbreak_short$cases > dt_cases <- dt_cases[order(dt_cases$Date), ][1:15,] > dt_regions <- toy_outbreak_short$dt_regions > all_dist <- geosphere::distGeo(matrix(c(rep(dt_regions$long, nrow(dt_regions)), + rep(dt_regions$lat, nrow(dt_regions))), + ncol = 2), + matrix(c(rep(dt_regions$long, each = nrow(dt_regions)), + rep(dt_regions$lat, each = nrow(dt_regions))), + ncol = 2)) > > dist_mat <- matrix(all_dist/1000, nrow = nrow(dt_regions)) > pop_vect <- dt_regions$population > names(pop_vect) <- rownames(dist_mat) <- colnames(dist_mat) <- dt_regions$region > > data <- outbreaker_data(dates = dt_cases$Date, age_group = dt_cases$age_group, + region = dt_cases$Cens_tract, population = pop_vect, + distance = dist_mat) > > res_null <- outbreaker(data = data, + config = null_config, + likelihoods = null_model) * checking for unstated dependencies in 'tests' ... OK * checking tests ... [4s] ERROR Running 'testthat.R' [3s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(o2geosocial) Registered S3 methods overwritten by 'o2geosocial': method from plot.outbreaker_chains outbreaker2 print.custom_likelihoods outbreaker2 print.custom_priors outbreaker2 print.outbreaker_chains outbreaker2 summary.outbreaker_chains outbreaker2 > > test_check("o2geosocial") ///// outbreaker custom likelihoods /// class: custom_likelihoods list number of items: 5 /// custom likelihoods set to NULL (default used) // $reporting NULL $timing_infections NULL $timing_sampling NULL $space NULL $age NULL ///// outbreaker custom likelihoods /// class: custom_likelihoods list number of items: 5 /// custom likelihoods // $reporting function(data, param, i) cpp_ll_reporting(data, param, i) $timing_infections function(data, param, i) cpp_ll_timing_infections(data, param, i) $timing_sampling function(data, param, i) cpp_ll_timing_sampling(data, param, i) $space function(data, config, param, i) cpp_ll_space(data, config, param, i) $age function(data, param, i) cpp_ll_age(data, param, i) * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [5s] ERROR Error(s) in re-building vignettes: --- re-building 'o2geosocial.Rmd' using rmarkdown * checking PDF version of manual ... [21s] OK * checking HTML version of manual ... [2s] OK * DONE Status: 3 ERRORs