diff --git a/R/powerDA.R b/R/powerDA.R index 0ce5b95..a98167c 100644 --- a/R/powerDA.R +++ b/R/powerDA.R @@ -322,7 +322,7 @@ powerDA <- function(data, predictor, paired = NULL, covars = NULL, test = NULL, # AUC test_roc <- NULL tryCatch( - test_roc <- pROC::roc(as.numeric(res.sub$Feature %in% spikeds[[which(r == tests.par)]][[2]]) ~ res.sub$pval, auc=TRUE, direction = ">"), + test_roc <- pROC::roc(as.numeric(res.sub$Feature %in% spikeds[[which(r == tests.par)]][[2]]) ~ res.sub$pval, auc=TRUE, direction = ">", quiet=TRUE), error = function(e) NULL) if(!is.null(test_roc)){ auc <- as.numeric(test_roc$auc) diff --git a/R/testDA.R b/R/testDA.R index 7862848..b9fb5fe 100644 --- a/R/testDA.R +++ b/R/testDA.R @@ -405,7 +405,7 @@ testDA <- function(data, predictor, paired = NULL, covars = NULL, R = 20, if(effectSize != 1){ test_roc <- NULL tryCatch( - test_roc <- pROC::roc(as.numeric(res.sub[[x]]$Feature %in% spikeds[[r]][[2]]) ~ res.sub[[x]]$pval, auc=TRUE, direction = ">"), + test_roc <- pROC::roc(as.numeric(res.sub[[x]]$Feature %in% spikeds[[r]][[2]]) ~ res.sub[[x]]$pval, auc=TRUE, direction = ">", quiet=TRUE), error = function(e) NULL) if(!is.null(test_roc)){ as.numeric(test_roc$auc)