* using log directory ‘/Users/ripley/R/packages/tests-devel/epiGWAS.Rcheck’ * using R Under development (unstable) (2022-01-11 r81470) * using platform: aarch64-apple-darwin21.2.0 (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘epiGWAS/DESCRIPTION’ ... OK * this is package ‘epiGWAS’ version ‘1.0.2’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... NOTE Package suggested but not available for checking: ‘biglasso’ * 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 ‘epiGWAS’ can be installed ... OK * 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 R 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 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 ... OK * checking Rd files ... 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 ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... ERROR Running examples in ‘epiGWAS-Ex.R’ failed The error most likely occurred in: > ### Name: modified_outcome > ### Title: Implements the modified outcome approach > ### Aliases: modified_outcome > > ### ** Examples > > n <- 30 > p <- 10 > X <- matrix((runif(n * p) < 0.5) + (runif(n * p) < 0.5), ncol = p, nrow = n) > A <- (runif(n, min = 0, max = 1) < 0.3) > propensity <- runif(n, min = 0.4, max = 0.8) > Y <- runif(n) < 1/ (1 + exp(- 2 * X[, 5, drop = FALSE])) > auc_scores <- modified_outcome(A, X, Y, propensity, + ncores = 1, parallel = TRUE, n_subsample = 1) Warning in remove(sub_X_shared) : object 'sub_X_shared' not found Error in (function (X, Y, family = "gaussian", n_subsample = 20, n_lambda = 100, : object 'stab' not found Calls: modified_outcome -> do.call -> Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(epiGWAS) > > test_check("epiGWAS") ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test_methods.R:56:3): do.call is instructed for stabilityBIG ───────── Error in `(function (X, Y, family = "gaussian", n_subsample = 20, n_lambda = 100, lambda_min_ratio = 0.01, eps = 1e-05, short = TRUE, ncores = 2) { if (requireNamespace("bigmemory", quietly = TRUE) & requireNamespace("biglasso", quietly = TRUE)) { stopifnot(family %in% c("gaussian", "binomial")) stopifnot(bigmemory::is.big.matrix(X)) idx <- subsample(length(Y), size = (length(Y)%/%2), n_subsample = n_subsample) full_fit <- biglasso::biglasso(X = X, y = Y, penalty = "enet", family = family, nlambda = n_lambda, ncores = ncores, lambda.min = lambda_min_ratio, alpha = 1 - eps, warn = FALSE) if (length(full_fit$lambda) < n_lambda) { full_fit <- biglasso::biglasso(X = X, y = Y, penalty = "enet", family = family, nlambda = n_lambda, ncores = ncores, lambda.min = min(full_fit$lambda)/(0.99 * max(full_fit$lambda)), alpha = 1 - eps, warn = FALSE) } length_lambda <- length(full_fit$lambda) stab <- array(0, dim = c(length_lambda, dim(X)[2])) for (i in seq_len(n_subsample)) { sub_X_shared <- bigmemory::deepcopy(X, rows = idx[, i], shared = FALSE, type = "double") partial_fit <- biglasso::biglasso(X = sub_X_shared, y = Y[idx[, i]], penalty = "enet", family = family, ncores = ncores, lambda = full_fit$lambda, alpha = 1 - eps, warn = FALSE) if (length(partial_fit$lambda) < length_lambda) { length_lambda <- length(partial_fit$lambda) } partial_coef <- as.matrix(stats::coef(partial_fit, s = full_fit$lambda)[seq_len(dim(X)[2]) + 1, seq_len(length_lambda)]) stab <- stab[seq_len(length_lambda), ] stab <- stab + t(partial_coef != 0) } } if (dir.exists("/tmp/boost_interprocess") & grepl("^darwin", R.version$os)) { unlink("/tmp/boost_interprocess", recursive = TRUE, force = TRUE) } remove(sub_X_shared) gc() stab <- stab/n_subsample aucs <- vapply(seq_len(ncol(stab)), function(i) { DescTools::AUC(x = seq_len((1 - short) * length_lambda + short * (length_lambda%/%2)), y = stab[seq_len((1 - short) * length_lambda + short * (length_lambda%/%2)), i]) }, double(1)) return(aucs) })(X = new("big.matrix", address = ), Y = c(1.42322186810854, 2.44393702232768, 2.10816855968068, 1.75003426548363, -2.40002604596271, 1.3947924323762, -1.86404661646885, -2.23206754355543, 1.47407719275476, 1.81036264248676, 1.28997090398644, 1.96231588707869, 2.1133110707023, 2.18038653730375, -2.43227565349823, 1.70350355888409, 2.32625419785055, -1.53580808506572, 1.84713778512892, 1.78169714686849, 1.39126515039213, -1.63095065280239, -1.62817602447584, 1.81613228984844, -1.28116091233225, 1.58060441849341, 1.48137979386212, 1.63232694771615, -1.27838119873652, 1.64477951890089, -1.55317522582016, 2.14530663887774, 1.35416466434529, -1.2725309868739, 1.70927268389171, 1.53308977722904, 2.12151967973884, -1.43776128438107, -1.72824085037246, -1.28154764322081, -1.64225855508638, 1.3647138782245, 1.89083947176758, 1.45733344748835, 1.36440011486259, 1.75619662493046, 2.07185408698217, -1.48871642134301, 1.72495006960868, 1.36435027152466, 2.18408349709321, 1.80875651555886, 1.50497120322793, 1.72315544900468, 2.24259319748452, -1.61005345116915, 1.71677611576008, -1.26468378383308, -1.44603198297897, -2.06252569702085, -1.30597483306751, -1.25259870203046, -1.78691572374156, -1.43494983215016, -1.33847438959732, 1.48595437626869, -1.9071243537548, 1.89978197125744, -1.60462946209917, -1.8027008624725, -2.28208589620571, 1.43967517973286, -1.66577635704554, 2.31430933283866, 1.66794498140825, 1.30812247946026, 1.56550836104492, -1.40632614794273, 1.59897917330574, 2.48714294584846, 1.37528443392949, -1.41170239104882, -1.33909852376744, 2.2623632613098, -1.34279402764679, 1.96628782632615, -1.72868305407581, -1.60076994712134, -1.43021520833418, -1.50515952322505, 2.08697990586102, 2.01569481398362, 1.31138688313189, 1.6907199365019, 1.40448836560565, 1.69585665812862, -1.30710697538019, 1.56568367124762, -2.01573875422528, 1.44984149566653, -1.2597766021487, -1.74507040437483, 2.46939394716023, -2.01090716899959, 1.61386103439351, -1.28383332144914, -1.54913349731337, 1.92020499598303, 1.4902474977519, 1.99668776145275, 1.40813494959528, -2.24786284871789, 1.79282239146309, -1.55559497701081, -1.35806846589242, -1.61174621038347, -2.42240167167532, 1.9514881803324, -1.37366823836371, 1.2519532813389, 2.32706617993782, -1.80170340406026, -1.32146145036065, -2.05310366574935, 2.19430656055558, -1.76600502596111, -1.65517012506296, -1.33242322018794, 1.29714075548564, -2.03105865121292, -1.39610664305851, 1.62744047474016, -1.87056600630067, 2.4341273337991, 1.33276795440174, -1.30948186475592, 1.85893425488556, -2.23784279347272, -2.06706889069444, -1.66203185155993, -1.35774752245124, -1.5231847549009, -1.96856599330369, -2.1372032115603, 2.07852805050074, -1.2959756678989, 2.29119077258388, 2.26917427331481, -2.30881065074481, -1.80550661504726, -1.62884933947584, 1.26427212642209, 1.66209706999802, 1.37438029501416, 1.28281131993695, -2.11270207154071, -1.76757399699395, -2.12860801463816, -2.42252968143418, 2.46277970624537, -2.24675900709276, 1.40624813951054, 1.42581084824157, 2.4452385811398, 1.35104471200126, -1.63944891759631, 1.66567275416989, 1.33484159544155, -1.25591664702989, 1.44077956339177, 2.2566773808871, -2.23541160387668, -1.35442736682885, 1.39453013558295, -1.6851202346625, 1.37919763835894, 1.90400002199099, -1.6823300434891, -1.3983317534621, 1.63851793648878, 1.65927681371373, -1.526706033534, -2.33971284007038, -1.69626989893928, -1.69023994088266, -1.68013606420807, -2.2969051287527, 1.67345695601782, -1.45953834727984, -1.46414278587237, -1.91522701537933, -2.37631194351376, -1.890776362442, 1.31215865254061, 2.16440782592172, 1.43786770080622, 2.08863728298373, -2.1855828395233, -2.01869086858794, 1.81900936089403 ), ncores = 2, n_subsample = 20, n_lambda = 100, family = "gaussian")`: object 'stab' not found Backtrace: █ 1. ├─testthat::expect_length(...) test_methods.R:56:2 2. │ └─testthat::quasi_label(enquo(object), arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─epiGWAS::modified_outcome(...) 5. ├─base::do.call(...) 6. └─(function (X, Y, family = "gaussian", n_subsample = 20, n_lambda = 100, ... ── Error (test_methods.R:88:3): jointly calling all methods is possible with epiGWAS ── Error in `(function (X, Y, family = "gaussian", n_subsample = 20, n_lambda = 100, lambda_min_ratio = 0.01, eps = 1e-05, short = TRUE, ncores = 2) { if (requireNamespace("bigmemory", quietly = TRUE) & requireNamespace("biglasso", quietly = TRUE)) { stopifnot(family %in% c("gaussian", "binomial")) stopifnot(bigmemory::is.big.matrix(X)) idx <- subsample(length(Y), size = (length(Y)%/%2), n_subsample = n_subsample) full_fit <- biglasso::biglasso(X = X, y = Y, penalty = "enet", family = family, nlambda = n_lambda, ncores = ncores, lambda.min = lambda_min_ratio, alpha = 1 - eps, warn = FALSE) if (length(full_fit$lambda) < n_lambda) { full_fit <- biglasso::biglasso(X = X, y = Y, penalty = "enet", family = family, nlambda = n_lambda, ncores = ncores, lambda.min = min(full_fit$lambda)/(0.99 * max(full_fit$lambda)), alpha = 1 - eps, warn = FALSE) } length_lambda <- length(full_fit$lambda) stab <- array(0, dim = c(length_lambda, dim(X)[2])) for (i in seq_len(n_subsample)) { sub_X_shared <- bigmemory::deepcopy(X, rows = idx[, i], shared = FALSE, type = "double") partial_fit <- biglasso::biglasso(X = sub_X_shared, y = Y[idx[, i]], penalty = "enet", family = family, ncores = ncores, lambda = full_fit$lambda, alpha = 1 - eps, warn = FALSE) if (length(partial_fit$lambda) < length_lambda) { length_lambda <- length(partial_fit$lambda) } partial_coef <- as.matrix(stats::coef(partial_fit, s = full_fit$lambda)[seq_len(dim(X)[2]) + 1, seq_len(length_lambda)]) stab <- stab[seq_len(length_lambda), ] stab <- stab + t(partial_coef != 0) } } if (dir.exists("/tmp/boost_interprocess") & grepl("^darwin", R.version$os)) { unlink("/tmp/boost_interprocess", recursive = TRUE, force = TRUE) } remove(sub_X_shared) gc() stab <- stab/n_subsample aucs <- vapply(seq_len(ncol(stab)), function(i) { DescTools::AUC(x = seq_len((1 - short) * length_lambda + short * (length_lambda%/%2)), y = stab[seq_len((1 - short) * length_lambda + short * (length_lambda%/%2)), i]) }, double(1)) return(aucs) })(X = new("big.matrix", address = ), Y = c(-2.08447335691305, 2.34452423627112, -1.31870930178803, -1.84279524401096, 1.72147062462451, 1.83477529203638, 1.50895760565527, 1.31055216053482, -1.77445967973019, 1.40605877780342, -2.03865379841149, 1.49672697998112, 1.2987701839087, -1.77077275816832, -2.33770546512401, -2.37790661875054, 1.34739661734878, -1.98542011891711, -1.44749561937948, 2.13764001666144, 2.32919602495544, 1.32901662525469, -1.49673878104509, -1.64704295920993, -2.01534626079983, -1.98675191944419, -1.69174493902947, -1.41458315109774, 1.35861125263629, -1.58789841517728, -1.4557409364327, 1.56465281304498, -1.51660988775235, 1.70062587831135, 2.40346906753391, -1.36985589314628, -2.15238170725306, 1.54900861884927, -2.13786504511759, 1.25193135959563, 1.34467353985935, 2.1107299842317, 1.43245067843521, -1.70403489062374, 1.52319358184768, 1.61461722875844, -1.87756235355379, -2.03255975939054, -1.4461949304561, 1.78107409602996, -1.62041733871985, 1.62505500372553, -1.64496804419994, -1.74322128969429, -1.77443287772509, 1.77147927995273, 2.02907524123605, -1.44075494868579, 1.37868537682386, 1.28730614072883, 2.04232482165397, 1.27361061126102, -1.909037499274, 1.48859364973979, -1.55528086573233, -2.11079428152945, -1.47982107786541, 2.06879126142144, 1.52737807048269, -1.83089844919751, 1.52026435545315, 1.25733985001039, 2.49083533857157, -2.3182328682909, 1.44953967404759, 2.4851266427565, -2.18830035268331, -2.45674576933551, 1.42528443717794, -1.56567221426456, 1.55279590381426, 1.4258613270685, -2.05822358245096, 2.15600821428056, -2.49378947861671, -1.27522340390281, 1.51876149698389, 2.12828308927012, 1.28291803486133, -2.34410774252575, -2.37141824409127, 1.85893000768846, 1.67347972817089, 1.62376453718992, 1.44724558820506, -1.25336106620462, 1.38143468628998, -1.30685592486952, 1.837728509081, -2.18311634860429, -1.40132674337819, -2.2472685634417, -2.31638140372646, 1.25568543978547, -1.34605879921422, 2.15715009774028, 1.5069887302585, -1.45171508845664, 2.00802153664389, 1.53974421949968, 1.505513515773, 2.04833219020138, 1.81695599484212, 1.40191958234093, -2.18362920368737, 1.75456714802065, -2.0804858906846, 1.37194181298539, 1.26097330993294, 1.30706073667862, -1.85879579731045, 1.69779100280944, 1.48474812605162, 1.86541506857512, -1.52441607451772, -2.48347302957185, 1.8041666231388, 2.24374253442403, 1.75952956428059, -2.40503838195206, -1.29351679101411, 2.04323078714962, 2.07754129926554, -1.61411479297777, -2.33565996718161, -1.60004953633128, 1.8261183990576, -1.32288747833235, 1.54789558620089, -2.09539583115586, -2.43718076360292, -1.86041634877273, 1.4683001738854, -1.40683843492332, -1.6682563682272, -1.68111778995648, -1.54254504796017, 2.47261820517616, 1.49995052402589, 2.04751867369603, 1.42465067571103, -1.39950742244967, 1.97168615020318, 1.32248520713193, 1.27065823923194, -2.32941940426176, 1.2753379805064, 1.85356086719712, -2.48067940277585, 2.39142788143151, -1.2579828700693, -2.35768826117678, 1.9748716205133, 1.2621445573094, 1.63708298527344, 2.27812538538272, 1.43232288308448, -2.30482847324732, -1.89996909964048, 1.28831731789894, 2.15466345375896, -1.30012405576101, 1.68100013598866, -1.62659172737279, -1.96724580506509, -1.7971544475492, 1.56774121107959, -1.31023292123141, 1.63457183231976, 1.93257358890352, -1.46152676942374, -1.27423657374592, 1.29645764069162, 1.25461678583322, -1.38671295642877, -2.28444175274864, 1.40596581640214, -1.29683899381396, 1.71678670841717, 1.58102229730817, -1.74607874739524, -1.65359826362689, 1.81378801151308, 1.3770302062792, 2.21964162098206, 1.8733621720806, 1.27549197962279, -1.46488004596761, 2.0434503125698, -1.82834205266492), ncores = 2, n_subsample = 20, family = "gaussian")`: object 'stab' not found Backtrace: █ 1. └─epiGWAS::epiGWAS(...) test_methods.R:88:2 2. ├─base::do.call(m, args = method_args) 3. └─epiGWAS::modified_outcome(...) 4. ├─base::do.call(...) 5. └─(function (X, Y, family = "gaussian", n_subsample = 20, n_lambda = 100, ... ── Error (test_stability.R:48:3): stabilityBIG correctly adapts to the length of the LASSO path ── Error in `stabilityBIG(X, Y, family = "gaussian", ncores = 2, short = TRUE)`: object 'stab' not found Backtrace: █ 1. └─epiGWAS::stabilityBIG(...) test_stability.R:48:2 ── Error (test_stability.R:70:3): stabilityBIG shortens the path if the model saturates ── Error in `stabilityBIG(X, Y, family = "gaussian", ncores = 2, lambda_min_ratio = 1e-05, short = TRUE)`: object 'stab' not found Backtrace: █ 1. ├─testthat::expect_type(...) test_stability.R:70:2 2. │ └─testthat::quasi_label(enquo(object), arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─epiGWAS::stabilityBIG(...) [ FAIL 4 | WARN 4 | SKIP 0 | PASS 37 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs, 1 NOTE See ‘/Users/ripley/R/packages/tests-devel/epiGWAS.Rcheck/00check.log’ for details. 27.67 real 19.52 user 3.37 sys