* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/BayesSurvive.Rcheck’ * using R Under development (unstable) (2025-12-22 r89217) * 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 ‘BayesSurvive/DESCRIPTION’ ... OK * this is package ‘BayesSurvive’ version ‘0.1.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 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 ‘BayesSurvive’ can be installed ... [16s/17s] OK * used C compiler: ‘gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’ * used C++ compiler: ‘g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)’ * 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 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 ... [22s/22s] 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 contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in shell scripts ... 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 use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... [55s/35s] ERROR Running examples in ‘BayesSurvive-Ex.R’ failed The error most likely occurred in: > ### Name: plotBrier > ### Title: Time-dependent Brier scores > ### Aliases: plotBrier > > ### ** Examples > > > library("BayesSurvive") > set.seed(123) > > # Load the example dataset > data("simData", package = "BayesSurvive") > > dataset <- list( + "X" = simData[[1]]$X, + "t" = simData[[1]]$time, + "di" = simData[[1]]$status + ) > > # Initial value: null model without covariates > initial <- list("gamma.ini" = rep(0, ncol(dataset$X))) > # Hyperparameters > hyperparPooled <- list( + "c0" = 2, # prior of baseline hazard + "tau" = 0.0375, # sd for coefficient prior + "cb" = 20, # sd for coefficient prior + "pi.ga" = 0.02, # prior variable selection probability for standard Cox models + "a" = -4, # hyperparameter in MRF prior + "b" = 0.1, # hyperparameter in MRF prior + "G" = simData$G # hyperparameter in MRF prior + ) > > ## No test: > # run Bayesian Cox with graph-structured priors > fit <- BayesSurvive( + survObj = dataset, hyperpar = hyperparPooled, + initial = initial, nIter = 50 + ) Running MCMC iterations ... | | | 0% | |= | 2% | |== | 4% | |=== | 6% | |==== | 8% | |===== | 10% | |====== | 12% | |======= | 14% | |======== | 16% | |========= | 18% | |========== | 20% | |=========== | 22% | |============ | 24% | |============= | 26% | |============== | 28% | |=============== | 30% | |================ | 32% | |================= | 34% | |================== | 36% | |=================== | 38% | |==================== | 40% | |===================== | 42% | |====================== | 44% | |======================= | 46% | |======================== | 48% | |========================= | 50% | |========================== | 52% | |=========================== | 54% | |============================ | 56% | |============================= | 58% | |============================== | 60% | |=============================== | 62% | |================================ | 64% | |================================= | 66% | |================================== | 68% | |=================================== | 70% | |==================================== | 72% | |===================================== | 74% | |====================================== | 76% | |======================================= | 78% | |======================================== | 80% | |========================================= | 82% | |========================================== | 84% | |=========================================== | 86% | |============================================ | 88% | |============================================= | 90% | |============================================== | 92% | |=============================================== | 94% | |================================================ | 96% | |================================================= | 98% | |==================================================| 100% > # predict survival probabilities of the train data > plotBrier(fit, survObj.new = dataset) Warning in `[.data.table`(score, , `:=`(IPA, 1 - Brier/Brier[model == "Null model"]), : A shallow copy of this data.table was taken so that := can add or remove 1 columns by reference. At an earlier point, this data.table was copied by R (or was created manually using structure() or similar). Avoid names<- and attr<- which in R currently (and oddly) may copy the whole data.table. Use set* syntax instead to avoid copying: ?set, ?setnames and ?setattr. It's also not unusual for data.table-agnostic packages to produce tables affected by this issue. If this message doesn't help, please report your use case to the data.table issue tracker so the root cause can be fixed or this message improved. Error in `[.data.table`(score, , `:=`(IPA, 1 - Brier/Brier[model == "Null model"]), : Internal error in dogroups: Trying to add new column by reference but tl is full; setalloccol should have run first at R level before getting to this point. Please report to the data.table issues tracker. Calls: plotBrier ... computePerformance -> IPACompute -> [ -> [.data.table Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [84s/77s] [84s/77s] ERROR 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(BayesSurvive) > > test_check("BayesSurvive") Saving _problems/test-general-32.R [ FAIL 1 | WARN 1 | SKIP 0 | PASS 16 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-general.R:32:1'): (code run outside of `test_that()`) ────────── Error in ``[.data.table`(score, , `:=`(IPA, 1 - Brier/Brier[model == "Null model"]), by = times)`: Internal error in dogroups: Trying to add new column by reference but tl is full; setalloccol should have run first at R level before getting to this point. Please report to the data.table issues tracker. Backtrace: ▆ 1. ├─stats::predict(fit, survObj.new = dataset, times = 8.5, verbose = FALSE) at test-general.R:32:1 2. └─BayesSurvive:::predict.BayesSurvive(...) 3. ├─riskRegression::Score(...) 4. └─riskRegression::Score.list(...) 5. └─riskRegression:::computePerformance(...) 6. └─riskRegression:::IPACompute(...) 7. ├─score[, `:=`(IPA, 1 - Brier/Brier[model == "Null model"]), by = times] 8. └─data.table:::`[.data.table`(...) [ FAIL 1 | WARN 1 | SKIP 0 | PASS 16 ] Error: ! Test failures. Execution halted * 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: 2 ERRORs See ‘/data/blackswan/ripley/R/packages/tests-devel/BayesSurvive.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 4:11.39, 251.10 + 24.52