- using R Under development (unstable) (2025-12-02 r89085)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
GNU Fortran (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
- running under: Fedora Linux 42 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘BioMoR/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘BioMoR’ 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 ‘BioMoR’ can be installed ... [26s/108s] OK
See the install log for details.
- 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 ... [8s/31s] OK
- checking whether the package can be loaded with stated dependencies ... [7s/27s] OK
- checking whether the package can be unloaded cleanly ... [7s/27s] OK
- checking whether the namespace can be loaded with stated dependencies ... [7s/26s] OK
- checking whether the namespace can be unloaded cleanly ... [8s/31s] OK
- checking loading without being on the library search path ... [7s/26s] 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 ... [33s/121s] 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 ... NONE
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [15m/36m] ERROR
Running ‘testthat.R’ [15m/36m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(BioMoR)
>
> test_check("BioMoR")
Loading required namespace: randomForest
Loading required package: ggplot2
Loading required package: lattice
Loading required package: dplyr
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Attaching package: 'recipes'
The following object is masked from 'package:stats':
step
randomForest 4.7-1.2
Type rfNews() to see new features/changes/bug fixes.
Attaching package: 'randomForest'
The following object is masked from 'package:dplyr':
combine
The following object is masked from 'package:ggplot2':
margin
Setting direction: controls > cases
note: only 1 unique complexity parameters in default grid. Truncating the grid to 1 .
------------------------------------------------------------------------------
You have loaded plyr after dplyr - this is likely to cause problems.
If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
library(plyr); library(dplyr)
------------------------------------------------------------------------------
Attaching package: 'plyr'
The following objects are masked from 'package:dplyr':
arrange, count, desc, failwith, id, mutate, rename, summarise,
summarize
Saving _problems/test_models-35.R
[ FAIL 1 | WARN 600 | SKIP 0 | PASS 5 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_models.R:35:3'): XGB model trains and predicts ─────────────────
Error in `{ if (!(length(ctrl$seeds) == 1L && is.na(ctrl$seeds))) set.seed(ctrl$seeds[[iter]][parm]) loadNamespace("caret") loadNamespace("recipes") if (ctrl$verboseIter) progress(printed[parm, , drop = FALSE], names(resampleIndex), iter) if (names(resampleIndex)[iter] != "AllData") { modelIndex <- resampleIndex[[iter]] holdoutIndex <- ctrl$indexOut[[iter]] } else { modelIndex <- 1:nrow(dat) holdoutIndex <- modelIndex } if (testing) cat("pre-model\n") if (!is.null(info$submodels[[parm]]) && nrow(info$submodels[[parm]]) > 0) { submod <- info$submodels[[parm]] } else submod <- NULL mod_rec <- try(rec_model(rec, subset_x(dat, modelIndex), method = method, tuneValue = info$loop[parm, , drop = FALSE], obsLevels = lev, classProbs = ctrl$classProbs, sampling = ctrl$sampling, ...), silent = TRUE) if (testing) print(mod_rec) if (!model_failed(mod_rec)) { predicted <- try(rec_pred(method = method, object = mod_rec, newdata = subset_x(dat, holdoutIndex), param = submod), silent = TRUE) if (pred_failed(predicted)) { fail_warning(settings = printed[parm, , drop = FALSE], msg = predicted, where = "predictions", iter = names(resampleIndex)[iter], verb = ctrl$verboseIter) predicted <- fill_failed_pred(index = holdoutIndex, lev = lev, submod) } } else { fail_warning(settings = printed[parm, , drop = FALSE], msg = mod_rec, iter = names(resampleIndex)[iter], verb = ctrl$verboseIter) predicted <- fill_failed_pred(index = holdoutIndex, lev = lev, submod) } if (testing) print(head(predicted)) if (ctrl$classProbs) { if (!model_failed(mod_rec)) { probValues <- rec_prob(method = method, object = mod_rec, newdata = subset_x(dat, holdoutIndex), param = submod) } else { probValues <- fill_failed_prob(holdoutIndex, lev, submod) } if (testing) print(head(probValues)) } predicted <- trim_values(predicted, ctrl, is.null(lev)) ho_data <- holdout_rec(mod_rec, dat, holdoutIndex) if (!is.null(submod)) { allParam <- expandParameters(info$loop[parm, , drop = FALSE], submod) allParam <- allParam[complete.cases(allParam), , drop = FALSE] predicted <- lapply(predicted, function(x, lv, dat) { x <- outcome_conversion(x, lv = lev) dat$pred <- x dat }, lv = lev, dat = ho_data) if (testing) print(head(predicted)) if (ctrl$classProbs) predicted <- mapply(cbind, predicted, probValues, SIMPLIFY = FALSE) if (keep_pred) { tmpPred <- predicted for (modIndex in seq(along.with = tmpPred)) { tmpPred[[modIndex]] <- merge(tmpPred[[modIndex]], allParam[modIndex, , drop = FALSE], all = TRUE) } tmpPred <- rbind.fill(tmpPred) tmpPred$Resample <- names(resampleIndex)[iter] } else tmpPred <- NULL thisResample <- lapply(predicted, ctrl$summaryFunction, lev = lev, model = method) if (testing) print(head(thisResample)) if (length(lev) > 1 && length(lev) <= 50) { cells <- lapply(predicted, function(x) flatTable(x$pred, x$obs)) for (ind in seq(along.with = cells)) thisResample[[ind]] <- c(thisResample[[ind]], cells[[ind]]) } thisResample <- do.call("rbind", thisResample) thisResample <- cbind(allParam, thisResample) } else { pred_val <- outcome_conversion(predicted, lv = lev) tmp <- ho_data tmp$pred <- pred_val if (ctrl$classProbs) tmp <- cbind(tmp, probValues) if (keep_pred) { tmpPred <- tmp tmpPred$rowIndex <- holdoutIndex tmpPred <- merge(tmpPred, info$loop[parm, , drop = FALSE], all = TRUE) tmpPred$Resample <- names(resampleIndex)[iter] } else tmpPred <- NULL thisResample <- ctrl$summaryFunction(tmp, lev = lev, model = method) if (length(lev) > 1 && length(lev) <= 50) thisResample <- c(thisResample, flatTable(tmp$pred, tmp$obs)) thisResample <- as.data.frame(t(thisResample), stringsAsFactors = FALSE) thisResample <- cbind(thisResample, info$loop[parm, , drop = FALSE]) } thisResample$Resample <- names(resampleIndex)[iter] thisResampleExtra <- optimism_rec(ctrl, dat, iter, lev, method, mod_rec, predicted, submod, info$loop[parm, , drop = FALSE]) if (ctrl$verboseIter) progress(printed[parm, , drop = FALSE], names(resampleIndex), iter, FALSE) if (testing) print(thisResample) list(resamples = thisResample, pred = tmpPred, resamplesExtra = thisResampleExtra) }`: task 1 failed - "$ operator is invalid for atomic vectors"
Backtrace:
▆
1. └─BioMoR::train_xgb_caret(df, "Label", ctrl) at test_models.R:35:3
2. ├─caret::train(...)
3. └─caret:::train.recipe(...)
4. └─caret:::train_rec(...)
5. └─... %op% ...
6. └─e$fun(obj, substitute(ex), parent.frame(), e$data)
[ FAIL 1 | WARN 600 | SKIP 0 | PASS 5 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [51s/178s] OK
- checking PDF version of manual ... [7s/22s] OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR