* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/VBphenoR.Rcheck’ * using R Under development (unstable) (2025-12-18 r89199) * 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 ‘VBphenoR/DESCRIPTION’ ... OK * this is package ‘VBphenoR’ version ‘1.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 ‘VBphenoR’ 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 ... 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 examples ... OK * checking examples with --run-donttest ... [157s/158s] ERROR Running examples in ‘VBphenoR-Ex.R’ failed The error most likely occurred in: > ### Name: run_Model > ### Title: Run the Variational Bayes patient phenotyping model > ### Aliases: run_Model > > ### ** Examples > > ## No test: > ##Example 1: Use the internal Sickle Cell Disease data to find the rare > ## phenotype. SCD is extremely rare so we use DBSCAN to initialise > ## the VB GMM. We also use an informative prior for the mixing > ## coefficient and stop iterations when the ELBO starts to reverse > ## so that we stop when the minor (SCD) component is reached. > > library(data.table) Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > > # Load the SCD example data supplied with the VBphenoR package > data(scd_cohort) > > # We will use the SCD biomarkers to discover the SCD latent class. > # X1 is the data matrix for the VB GMM. > X1 <- scd_cohort[,.(CBC,RC)] > > # We need to supply DBSCAN hyper-parameters as we will initialise VBphenoR > # with DBSCAN. See help(DBSCAN) for details of these parameters. > initParams <- c(0.15, 5) > names(initParams) <- c('eps','minPts') > > # Set an informative prior for the VB GMM mixing coefficient alpha > # hyper-parameter > prior_gmm <- list( + alpha = 0.001 + ) > > # Set informative priors for the beta coefficients of the VB logit > prior_logit <- list(mu=c(1, + mean(scd_cohort$age), + mean(scd_cohort$highrisk), + mean(scd_cohort$CBC), + mean(scd_cohort$RC)), + Sigma=diag(1,5)) # Simplest isotropic case > > # X2 is the design matrix for the VB logit > X2 <- scd_cohort[,.(age,highrisk,CBC,RC)] > X2[,age:=as.numeric(age)] > X2[,highrisk:=as.numeric(highrisk)] > X2[,Intercept:=1] > setcolorder(X2, c("Intercept","age","highrisk","CBC","RC")) > > # Run the patient phenotyping model > > # Need to state what columns are the biomarkers > biomarkers <- c('CBC', 'RC') > set.seed(123) > > pheno_result <- run_Model(biomarkers, + gmm_X=X1, gmm_init="dbscan", + gmm_initParams=initParams, + gmm_maxiters=20, gmm_prior=prior_gmm, + gmm_stopIfELBOReverse=TRUE, + logit_X=X2, logit_prior=prior_logit + ) Error in `[.data.table`(logit_dt, , `:=`(log_odds, sum(coeff * .SD)), : attempt access index 5/5 in VECTOR_ELT Calls: run_Model -> [ -> [.data.table Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ 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/VBphenoR.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:44.58, 206.11 + 16.91