From dbaeeba9cca779ec10d55a154702a14f7688646c Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Thu, 16 Jul 2026 19:37:34 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20R=20=EC=96=B8=EC=96=B4?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=B5=9C=EC=86=8C=EA=B0=92=20=ED=83=90?= =?UTF-8?q?=EC=83=89=20=EC=8B=9C=20O(N=20log=20N)=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EB=B3=91=EB=AA=A9=20=EC=B5=9C=EC=A0=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .Rbuildignore | 1 + R/surveyFA.R | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index 232504f..388f1c6 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -22,3 +22,4 @@ ^\.jules(/.*)?$ ^\.trivyignore\.yaml$ ^trivy\.yaml$ +^\.semgrepignore$ diff --git a/R/surveyFA.R b/R/surveyFA.R index f60fffd..3811ad0 100644 --- a/R/surveyFA.R +++ b/R/surveyFA.R @@ -232,7 +232,8 @@ surveyFA <- function( names(p_values) <- rownames(fit_df) if (any(!is.na(p_values))) { p_values[is.na(p_values)] <- 1 - candidate <- names(sort(p_values, decreasing = FALSE))[1L] + # ⚡ Bolt: Replace O(N log N) sort() with O(N) which.min() for performance + candidate <- names(p_values)[which.min(p_values)] if (!is.na(candidate) && p_values[[candidate]] < pThreshold) { return(candidate) }