From 9c08d3a95cca5bf503353f5c6b824f4dbb857a41 Mon Sep 17 00:00:00 2001 From: Adrian Salavaty Date: Thu, 9 Nov 2023 11:58:47 +1100 Subject: [PATCH] Debug exir function. --- R/functions.R | 6 +++++- inst/ShinyApps/ExIR/app.R | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/R/functions.R b/R/functions.R index 7235b45..19b60a5 100755 --- a/R/functions.R +++ b/R/functions.R @@ -2407,7 +2407,11 @@ sirir <- function(graph, vertices = V(graph), rf.diff.exptl.pvalue <- base::subset(rf.diff.exptl.pvalue, rf.diff.exptl.pvalue$pvalue < alpha) } else { - rf.pval.select <- which(rf.diff.exptl.pvalue[,"pvalue"] = 10) { + rf.pval.select <- which(rf.diff.exptl.pvalue[, "pvalue"] < alpha) + } else { + rf.pval.select <- which(order(rf.diff.exptl.pvalue[, "pvalue"]) <= 10) + } rf.nonSig <- seq(nrow(rf.diff.exptl.pvalue))[-rf.pval.select] required.pos.importance <- select.number - length(rf.pval.select) diff --git a/inst/ShinyApps/ExIR/app.R b/inst/ShinyApps/ExIR/app.R index cc999ca..e924364 100755 --- a/inst/ShinyApps/ExIR/app.R +++ b/inst/ShinyApps/ExIR/app.R @@ -2328,7 +2328,11 @@ server <- function(input, output, session, rf.diff.exptl.pvalue <- base::subset(rf.diff.exptl.pvalue, rf.diff.exptl.pvalue$pvalue < alpha) } else { - rf.pval.select <- which(rf.diff.exptl.pvalue[,"pvalue"] = 10) { + rf.pval.select <- which(rf.diff.exptl.pvalue[, "pvalue"] < alpha) + } else { + rf.pval.select <- which(order(rf.diff.exptl.pvalue[, "pvalue"]) <= 10) + } rf.nonSig <- seq(nrow(rf.diff.exptl.pvalue))[-rf.pval.select] required.pos.importance <- select.number - length(rf.pval.select)