Back to Multiple platform build/check report for BioC 3.11 |
|
This page was generated on 2020-10-17 11:56:03 -0400 (Sat, 17 Oct 2020).
TO THE DEVELOPERS/MAINTAINERS OF THE adaptest PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page. |
Package 18/1905 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||
adaptest 1.8.0 Weixin Cai
| malbec2 | Linux (Ubuntu 18.04.4 LTS) / x86_64 | OK | OK | ERROR | |||||||
tokay2 | Windows Server 2012 R2 Standard / x64 | OK | OK | [ ERROR ] | OK | |||||||
machv2 | macOS 10.14.6 Mojave / x86_64 | OK | OK | ERROR | OK |
Package: adaptest |
Version: 1.8.0 |
Command: C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:adaptest.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings adaptest_1.8.0.tar.gz |
StartedAt: 2020-10-17 01:25:25 -0400 (Sat, 17 Oct 2020) |
EndedAt: 2020-10-17 01:30:04 -0400 (Sat, 17 Oct 2020) |
EllapsedTime: 279.2 seconds |
RetCode: 1 |
Status: ERROR |
CheckDir: adaptest.Rcheck |
Warnings: NA |
############################################################################## ############################################################################## ### ### Running command: ### ### C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:adaptest.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings adaptest_1.8.0.tar.gz ### ############################################################################## ############################################################################## * using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/adaptest.Rcheck' * using R version 4.0.3 (2020-10-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * using option '--no-vignettes' * checking for file 'adaptest/DESCRIPTION' ... OK * this is package 'adaptest' version '1.8.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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'adaptest' 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 * loading checks for arch 'i386' ** 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 * loading checks for arch 'x64' ** 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 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 data for ASCII and uncompressed saves ... OK * checking files in 'vignettes' ... OK * checking examples ... ** running examples for arch 'i386' ... ERROR Running examples in 'adaptest-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: adaptest > ### Title: Data-adaptive Statistics for High-Dimensional Multiple Testing > ### Aliases: adaptest > > ### ** Examples > > set.seed(1234) > data(simpleArray) > simulated_array <- simulated_array > simulated_treatment <- simulated_treatment > > adaptest(Y = simulated_array, + A = simulated_treatment, + W = NULL, + n_top = 5, + n_fold = 3, + learning_library = 'SL.glm', + parameter_wrapper = adaptest::rank_DE, + absolute = FALSE, + negative = FALSE) ----------- FAILURE REPORT -------------- --- failure: the condition has length > 1 --- --- srcref --- : --- package (from environment) --- adaptest --- call from context --- adaptest(Y = simulated_array, A = simulated_treatment, W = NULL, n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE, absolute = FALSE, negative = FALSE) --- call from argument --- if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } --- R stacktrace --- where 1: adaptest(Y = simulated_array, A = simulated_treatment, W = NULL, n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE, absolute = FALSE, negative = FALSE) --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE, learning_library = c("SL.glm", "SL.step", "SL.glm.interaction", "SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE, p_cutoff = 0.05, q_cutoff = 0.05) { if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top, n_fold = n_fold, absolute = absolute, negative = negative, parameter_wrapper = parameter_wrapper, learning_library = learning_library) n_sim <- nrow(data_adapt$Y) p_all <- ncol(data_adapt$Y) if (is.null(data_adapt$W)) { W <- as.matrix(rep(1, n_sim)) data_adapt$W <- W } sample_each_fold <- ceiling(n_sim/n_fold) index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold), n = n_sim)) table_n_per_fold <- table(index_for_folds) rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all) adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top) folds <- origami::make_folds(n = n_sim, V = n_fold) df_all <- data.frame(Y = Y_in, A = A, W = W) Y_name <- grep("Y", colnames(df_all)) A_name <- grep("A", colnames(df_all)) W_name <- grep("W", colnames(df_all)) cv_results <- origami::cross_validate(cv_fun = cv_param_est, folds = folds, data = df_all, parameter_wrapper = parameter_wrapper, absolute = absolute, negative = negative, n_top = n_top, learning_library = learning_library, Y_name = Y_name, A_name = A_name, W_name = W_name) rank_in_folds <- matrix(data = cv_results$data_adaptive_index, nrow = n_fold, ncol = p_all, byrow = TRUE) adapt_param_composition <- matrix(data = cv_results$index_grid, nrow = n_fold, ncol = n_top, byrow = TRUE) psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold, ncol = n_top, byrow = TRUE) EIC_est_final <- cv_results$EIC_est Psi_output <- colMeans(psi_est_final) inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff) p_value <- inference_out[[1]] upper <- inference_out[[2]] lower <- inference_out[[3]] sd_by_col <- inference_out[[4]] adaptY_composition <- adapt_param_composition[, seq_len(n_top)] if (class(adaptY_composition) == "integer") { adaptY_composition <- matrix(adaptY_composition, ncol = 1) adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition))) } else { ls <- vector("list", ncol(adaptY_composition)) for (i in seq_len(ncol(adaptY_composition))) { x <- adaptY_composition[, i] ls[[i]] <- table(x)/sum(table(x)) } adaptY_composition <- ls } q_value <- stats::p.adjust(p_value, method = "BH") is_sig_q_value <- q_value <= q_cutoff significant_q <- which(is_sig_q_value) top_colname <- adaptY_composition top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)] mean_rank <- colMeans(rank_in_folds) top_index <- sort(as.numeric(unique(unlist(lapply(top_colname, names))))) mean_rank_top <- mean_rank[top_index] top_index <- top_index[order(mean_rank_top)] mean_rank_top <- mean_rank[top_index] not_top_index <- setdiff(seq_len(p_all), top_index) mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) + 0 prob_in_top <- colMeans(mean_rank_in_top) prob_in_top <- prob_in_top[top_index] data_adapt$top_index <- top_index data_adapt$top_colname <- top_colname data_adapt$top_colname_significant_q <- top_colname_significant_q data_adapt$DE <- Psi_output data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x0cb2d170> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 ** running examples for arch 'x64' ... ERROR Running examples in 'adaptest-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: adaptest > ### Title: Data-adaptive Statistics for High-Dimensional Multiple Testing > ### Aliases: adaptest > > ### ** Examples > > set.seed(1234) > data(simpleArray) > simulated_array <- simulated_array > simulated_treatment <- simulated_treatment > > adaptest(Y = simulated_array, + A = simulated_treatment, + W = NULL, + n_top = 5, + n_fold = 3, + learning_library = 'SL.glm', + parameter_wrapper = adaptest::rank_DE, + absolute = FALSE, + negative = FALSE) ----------- FAILURE REPORT -------------- --- failure: the condition has length > 1 --- --- srcref --- : --- package (from environment) --- adaptest --- call from context --- adaptest(Y = simulated_array, A = simulated_treatment, W = NULL, n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE, absolute = FALSE, negative = FALSE) --- call from argument --- if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } --- R stacktrace --- where 1: adaptest(Y = simulated_array, A = simulated_treatment, W = NULL, n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE, absolute = FALSE, negative = FALSE) --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE, learning_library = c("SL.glm", "SL.step", "SL.glm.interaction", "SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE, p_cutoff = 0.05, q_cutoff = 0.05) { if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top, n_fold = n_fold, absolute = absolute, negative = negative, parameter_wrapper = parameter_wrapper, learning_library = learning_library) n_sim <- nrow(data_adapt$Y) p_all <- ncol(data_adapt$Y) if (is.null(data_adapt$W)) { W <- as.matrix(rep(1, n_sim)) data_adapt$W <- W } sample_each_fold <- ceiling(n_sim/n_fold) index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold), n = n_sim)) table_n_per_fold <- table(index_for_folds) rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all) adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top) folds <- origami::make_folds(n = n_sim, V = n_fold) df_all <- data.frame(Y = Y_in, A = A, W = W) Y_name <- grep("Y", colnames(df_all)) A_name <- grep("A", colnames(df_all)) W_name <- grep("W", colnames(df_all)) cv_results <- origami::cross_validate(cv_fun = cv_param_est, folds = folds, data = df_all, parameter_wrapper = parameter_wrapper, absolute = absolute, negative = negative, n_top = n_top, learning_library = learning_library, Y_name = Y_name, A_name = A_name, W_name = W_name) rank_in_folds <- matrix(data = cv_results$data_adaptive_index, nrow = n_fold, ncol = p_all, byrow = TRUE) adapt_param_composition <- matrix(data = cv_results$index_grid, nrow = n_fold, ncol = n_top, byrow = TRUE) psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold, ncol = n_top, byrow = TRUE) EIC_est_final <- cv_results$EIC_est Psi_output <- colMeans(psi_est_final) inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff) p_value <- inference_out[[1]] upper <- inference_out[[2]] lower <- inference_out[[3]] sd_by_col <- inference_out[[4]] adaptY_composition <- adapt_param_composition[, seq_len(n_top)] if (class(adaptY_composition) == "integer") { adaptY_composition <- matrix(adaptY_composition, ncol = 1) adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition))) } else { ls <- vector("list", ncol(adaptY_composition)) for (i in seq_len(ncol(adaptY_composition))) { x <- adaptY_composition[, i] ls[[i]] <- table(x)/sum(table(x)) } adaptY_composition <- ls } q_value <- stats::p.adjust(p_value, method = "BH") is_sig_q_value <- q_value <= q_cutoff significant_q <- which(is_sig_q_value) top_colname <- adaptY_composition top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)] mean_rank <- colMeans(rank_in_folds) top_index <- sort(as.numeric(unique(unlist(lapply(top_colname, names))))) mean_rank_top <- mean_rank[top_index] top_index <- top_index[order(mean_rank_top)] mean_rank_top <- mean_rank[top_index] not_top_index <- setdiff(seq_len(p_all), top_index) mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) + 0 prob_in_top <- colMeans(mean_rank_in_top) prob_in_top <- prob_in_top[top_index] data_adapt$top_index <- top_index data_adapt$top_colname <- top_colname data_adapt$top_colname_significant_q <- top_colname_significant_q data_adapt$DE <- Psi_output data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x000000001ef9f9a8> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 * checking for unstated dependencies in 'tests' ... OK * checking tests ... ** running tests for arch 'i386' ... Running 'testthat.R' ERROR Running the tests in 'tests/testthat.R' failed. Last 13 lines of output: data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x13cc92f8> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 ** running tests for arch 'x64' ... Running 'testthat.R' ERROR Running the tests in 'tests/testthat.R' failed. Last 13 lines of output: data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x000000001f9f8ea0> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... SKIPPED * checking re-building of vignette outputs ... SKIPPED * checking PDF version of manual ... OK * DONE Status: 4 ERRORs See 'C:/Users/biocbuild/bbs-3.11-bioc/meat/adaptest.Rcheck/00check.log' for details.
adaptest.Rcheck/00install.out
############################################################################## ############################################################################## ### ### Running command: ### ### C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.11/bioc/src/contrib/adaptest_1.8.0.tar.gz && rm -rf adaptest.buildbin-libdir && mkdir adaptest.buildbin-libdir && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=adaptest.buildbin-libdir adaptest_1.8.0.tar.gz && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL adaptest_1.8.0.zip && rm adaptest_1.8.0.tar.gz adaptest_1.8.0.zip ### ############################################################################## ############################################################################## % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1090k 100 1090k 0 0 14.2M 0 --:--:-- --:--:-- --:--:-- 15.4M install for i386 * installing *source* package 'adaptest' ... ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices converting help for package 'adaptest' finding HTML links ... done adapTMLE-class html adaptest html adaptest_old html bioadaptest html cv_param_est html data_adapt html get_composition html get_pval html get_results_adaptmle html get_significant_biomarker html plot.data_adapt html print.data_adapt html rank_DE html rank_ttest html simulated_array html simulated_treatment html summary.data_adapt html ** building package indices ** installing vignettes ** testing if installed package can be loaded from temporary location ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path install for x64 * installing *source* package 'adaptest' ... ** testing if installed package can be loaded * MD5 sums packaged installation of 'adaptest' as adaptest_1.8.0.zip * DONE (adaptest) * installing to library 'C:/Users/biocbuild/bbs-3.11-bioc/R/library' package 'adaptest' successfully unpacked and MD5 sums checked
adaptest.Rcheck/tests_i386/testthat.Rout.fail R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(adaptest) adaptest v1.8.0: Data-Adaptive Statistics for High-Dimensional Multiple Testing > > Sys.setenv(R_TESTS = "") > test_check("adaptest") ----------- FAILURE REPORT -------------- --- failure: the condition has length > 1 --- --- srcref --- : --- package (from environment) --- adaptest --- call from context --- adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step")) --- call from argument --- if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } --- R stacktrace --- where 1: adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step")) where 2 at testthat/test-cv_origami.R#65: system.time(result_seq <- adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step"))) where 3: eval(code, test_env) where 4: eval(code, test_env) where 5: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) where 6: doTryCatch(return(expr), name, parentenv, handler) where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 9: doTryCatch(return(expr), name, parentenv, handler) where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 11: tryCatchList(expr, classes, parentenv, handlers) where 12: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) where 13: test_code(NULL, exprs, env) where 14: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap) where 15: force(code) where 16: doWithOneRestart(return(expr), restart) where 17: withOneRestart(expr, restarts[[1L]]) where 18: withRestarts(testthat_abort_reporter = function() NULL, force(code)) where 19: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, { reporter$start_file(basename(path)) lister$start_file(basename(path)) source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap) reporter$.end_context() reporter$end_file() }) where 20: FUN(X[[i]], ...) where 21: lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap) where 22: force(code) where 23: doWithOneRestart(return(expr), restart) where 24: withOneRestart(expr, restarts[[1L]]) where 25: withRestarts(testthat_abort_reporter = function() NULL, force(code)) where 26: with_reporter(reporter = current_reporter, results <- lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)) where 27: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 28: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 29: test_package_dir(package = package, test_path = test_path, filter = filter, reporter = reporter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 30: test_check("adaptest") --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE, learning_library = c("SL.glm", "SL.step", "SL.glm.interaction", "SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE, p_cutoff = 0.05, q_cutoff = 0.05) { if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top, n_fold = n_fold, absolute = absolute, negative = negative, parameter_wrapper = parameter_wrapper, learning_library = learning_library) n_sim <- nrow(data_adapt$Y) p_all <- ncol(data_adapt$Y) if (is.null(data_adapt$W)) { W <- as.matrix(rep(1, n_sim)) data_adapt$W <- W } sample_each_fold <- ceiling(n_sim/n_fold) index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold), n = n_sim)) table_n_per_fold <- table(index_for_folds) rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all) adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top) folds <- origami::make_folds(n = n_sim, V = n_fold) df_all <- data.frame(Y = Y_in, A = A, W = W) Y_name <- grep("Y", colnames(df_all)) A_name <- grep("A", colnames(df_all)) W_name <- grep("W", colnames(df_all)) cv_results <- origami::cross_validate(cv_fun = cv_param_est, folds = folds, data = df_all, parameter_wrapper = parameter_wrapper, absolute = absolute, negative = negative, n_top = n_top, learning_library = learning_library, Y_name = Y_name, A_name = A_name, W_name = W_name) rank_in_folds <- matrix(data = cv_results$data_adaptive_index, nrow = n_fold, ncol = p_all, byrow = TRUE) adapt_param_composition <- matrix(data = cv_results$index_grid, nrow = n_fold, ncol = n_top, byrow = TRUE) psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold, ncol = n_top, byrow = TRUE) EIC_est_final <- cv_results$EIC_est Psi_output <- colMeans(psi_est_final) inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff) p_value <- inference_out[[1]] upper <- inference_out[[2]] lower <- inference_out[[3]] sd_by_col <- inference_out[[4]] adaptY_composition <- adapt_param_composition[, seq_len(n_top)] if (class(adaptY_composition) == "integer") { adaptY_composition <- matrix(adaptY_composition, ncol = 1) adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition))) } else { ls <- vector("list", ncol(adaptY_composition)) for (i in seq_len(ncol(adaptY_composition))) { x <- adaptY_composition[, i] ls[[i]] <- table(x)/sum(table(x)) } adaptY_composition <- ls } q_value <- stats::p.adjust(p_value, method = "BH") is_sig_q_value <- q_value <= q_cutoff significant_q <- which(is_sig_q_value) top_colname <- adaptY_composition top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)] mean_rank <- colMeans(rank_in_folds) top_index <- sort(as.numeric(unique(unlist(lapply(top_colname, names))))) mean_rank_top <- mean_rank[top_index] top_index <- top_index[order(mean_rank_top)] mean_rank_top <- mean_rank[top_index] not_top_index <- setdiff(seq_len(p_all), top_index) mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) + 0 prob_in_top <- colMeans(mean_rank_in_top) prob_in_top <- prob_in_top[top_index] data_adapt$top_index <- top_index data_adapt$top_colname <- top_colname data_adapt$top_colname_significant_q <- top_colname_significant_q data_adapt$DE <- Psi_output data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x13cc92f8> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 |
adaptest.Rcheck/tests_x64/testthat.Rout.fail R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(adaptest) adaptest v1.8.0: Data-Adaptive Statistics for High-Dimensional Multiple Testing > > Sys.setenv(R_TESTS = "") > test_check("adaptest") ----------- FAILURE REPORT -------------- --- failure: the condition has length > 1 --- --- srcref --- : --- package (from environment) --- adaptest --- call from context --- adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step")) --- call from argument --- if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } --- R stacktrace --- where 1: adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step")) where 2 at testthat/test-cv_origami.R#65: system.time(result_seq <- adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4, learning_library = c("SL.mean", "SL.glm", "SL.step"))) where 3: eval(code, test_env) where 4: eval(code, test_env) where 5: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) where 6: doTryCatch(return(expr), name, parentenv, handler) where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) where 9: doTryCatch(return(expr), name, parentenv, handler) where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) where 11: tryCatchList(expr, classes, parentenv, handlers) where 12: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() } }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) where 13: test_code(NULL, exprs, env) where 14: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap) where 15: force(code) where 16: doWithOneRestart(return(expr), restart) where 17: withOneRestart(expr, restarts[[1L]]) where 18: withRestarts(testthat_abort_reporter = function() NULL, force(code)) where 19: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, { reporter$start_file(basename(path)) lister$start_file(basename(path)) source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap) reporter$.end_context() reporter$end_file() }) where 20: FUN(X[[i]], ...) where 21: lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap) where 22: force(code) where 23: doWithOneRestart(return(expr), restart) where 24: withOneRestart(expr, restarts[[1L]]) where 25: withRestarts(testthat_abort_reporter = function() NULL, force(code)) where 26: with_reporter(reporter = current_reporter, results <- lapply(paths, test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)) where 27: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 28: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 29: test_package_dir(package = package, test_path = test_path, filter = filter, reporter = reporter, ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, wrap = wrap) where 30: test_check("adaptest") --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE, learning_library = c("SL.glm", "SL.step", "SL.glm.interaction", "SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE, p_cutoff = 0.05, q_cutoff = 0.05) { if (class(Y) == "adapTMLE") { Y_in <- as.matrix(t(SummarizedExperiment::assay(Y))) rownames(Y_in) <- colnames(Y_in) <- NULL } else { Y_in <- as.matrix(Y) } data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top, n_fold = n_fold, absolute = absolute, negative = negative, parameter_wrapper = parameter_wrapper, learning_library = learning_library) n_sim <- nrow(data_adapt$Y) p_all <- ncol(data_adapt$Y) if (is.null(data_adapt$W)) { W <- as.matrix(rep(1, n_sim)) data_adapt$W <- W } sample_each_fold <- ceiling(n_sim/n_fold) index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold), n = n_sim)) table_n_per_fold <- table(index_for_folds) rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all) adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top) folds <- origami::make_folds(n = n_sim, V = n_fold) df_all <- data.frame(Y = Y_in, A = A, W = W) Y_name <- grep("Y", colnames(df_all)) A_name <- grep("A", colnames(df_all)) W_name <- grep("W", colnames(df_all)) cv_results <- origami::cross_validate(cv_fun = cv_param_est, folds = folds, data = df_all, parameter_wrapper = parameter_wrapper, absolute = absolute, negative = negative, n_top = n_top, learning_library = learning_library, Y_name = Y_name, A_name = A_name, W_name = W_name) rank_in_folds <- matrix(data = cv_results$data_adaptive_index, nrow = n_fold, ncol = p_all, byrow = TRUE) adapt_param_composition <- matrix(data = cv_results$index_grid, nrow = n_fold, ncol = n_top, byrow = TRUE) psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold, ncol = n_top, byrow = TRUE) EIC_est_final <- cv_results$EIC_est Psi_output <- colMeans(psi_est_final) inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff) p_value <- inference_out[[1]] upper <- inference_out[[2]] lower <- inference_out[[3]] sd_by_col <- inference_out[[4]] adaptY_composition <- adapt_param_composition[, seq_len(n_top)] if (class(adaptY_composition) == "integer") { adaptY_composition <- matrix(adaptY_composition, ncol = 1) adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition))) } else { ls <- vector("list", ncol(adaptY_composition)) for (i in seq_len(ncol(adaptY_composition))) { x <- adaptY_composition[, i] ls[[i]] <- table(x)/sum(table(x)) } adaptY_composition <- ls } q_value <- stats::p.adjust(p_value, method = "BH") is_sig_q_value <- q_value <= q_cutoff significant_q <- which(is_sig_q_value) top_colname <- adaptY_composition top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)] mean_rank <- colMeans(rank_in_folds) top_index <- sort(as.numeric(unique(unlist(lapply(top_colname, names))))) mean_rank_top <- mean_rank[top_index] top_index <- top_index[order(mean_rank_top)] mean_rank_top <- mean_rank[top_index] not_top_index <- setdiff(seq_len(p_all), top_index) mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) + 0 prob_in_top <- colMeans(mean_rank_in_top) prob_in_top <- prob_in_top[top_index] data_adapt$top_index <- top_index data_adapt$top_colname <- top_colname data_adapt$top_colname_significant_q <- top_colname_significant_q data_adapt$DE <- Psi_output data_adapt$p_value <- p_value data_adapt$q_value <- q_value data_adapt$significant_q <- significant_q data_adapt$mean_rank_top <- mean_rank_top data_adapt$prob_in_top <- prob_in_top data_adapt$folds <- folds return(data_adapt) } <bytecode: 0x000000001f9f8ea0> <environment: namespace:adaptest> --- function search by body --- Function adaptest in namespace adaptest has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: the condition has length > 1 |
adaptest.Rcheck/examples_i386/adaptest-Ex.timings
|
adaptest.Rcheck/examples_x64/adaptest-Ex.timings
|