* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/easy.glmnet.Rcheck’ * using R Under development (unstable) (2025-11-16 r89026) * 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 ‘easy.glmnet/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘easy.glmnet’ version ‘1.0’ * 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 ‘easy.glmnet’ can be installed ... OK * checking package 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 ... [13s/14s] 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 examples ... [13s/16s] OK * checking examples with --run-donttest ... [9s/12s] ERROR Running examples in ‘easy.glmnet-Ex.R’ failed The error most likely occurred in: > ### Name: impute.glmnet.matrix_fit > ### Title: Impute missing variables in a glmnet matrix multiple times > ### Aliases: impute.glmnet.matrix impute.glmnet.matrix_fit > > ### ** Examples > > # Quick example > > # Create random x with missing values > x = matrix(rnorm(300), ncol = 3) > x = x + rnorm(1) * x[,sample(1:3)] + rnorm(1) * x[,sample(1:3)] > x[sample(1:300, 30)] = NA > > # Impute missing values > m_impute = impute.glmnet.matrix_fit(x, ncores = 2) [impute.glmnet.matrix_fit] Estimating imputation models (it can take time!)... [impute.glmnet.matrix_fit] Running time: 2.928725 seconds > x_imputed = impute.glmnet.matrix(m_impute, x) [impute.glmnet.matrix] Imputing missing values... [impute.glmnet.matrix] Running time: 0.01952028 seconds > > > # Complete example (it might take some time even if the example is simple...) > ## No test: > # Create random x (predictors) and y (binary) > x = matrix(rnorm(4000), ncol = 20) > x = x + rnorm(1) * x[,sample(1:20)] + rnorm(1) * x[,sample(1:20)] > y = 1 * (plogis(x[,1] - x[,2] + rnorm(200, 0, 0.1)) > 0.5) > > # Make some x missing values > x[sample(1:4000, 400)] = NA > > # Predict y via cross-validation, including imputations > fit_fun = function (x_training, y_training) { + m = list( + impute = impute.glmnet.matrix_fit(x_training, ncores = pmax(1, parallel::detectCores() - 2)), + lasso = list() + ) + x_imputed = impute.glmnet.matrix(m$impute, x_training) + for (imp in 1:length(x_imputed)) { + m$lasso[[imp]] = glmnet_fit(x_imputed[[imp]], y_training, family = "binomial") + } + m + } > predict_fun = function (m, x_test) { + x_imputed = impute.glmnet.matrix(m$impute, x_test) + y_pred = NULL + for (imp in 1:length(x_imputed)) { + y_pred = cbind(y_pred, glmnet_predict(m$lasso[[imp]], x_imputed[[imp]])) + } + apply(y_pred, 1, mean) + } > # Only 2 folds to ensure the example runs quickly > res = cv(x, y, family = "binomial", fit_fun = fit_fun, predict_fun = predict_fun, nfolds = 2) [cv] Simple cross-validation [cv] Fold 1 - Training [impute.glmnet.matrix_fit] Estimating imputation models (it can take time!)... Error in .check_ncores(length(names)) : 30 simultaneous processes spawned Calls: cv ... impute.glmnet.matrix_fit -> makeCluster -> makePSOCKcluster -> .check_ncores Execution halted * 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/easy.glmnet.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:59.72, 90.36 + 20.77