From 6c65b6771f3cc51edf09313770913da51900a2f6 Mon Sep 17 00:00:00 2001 From: vagudets Date: Wed, 11 Dec 2024 16:07:58 +0100 Subject: [PATCH] Apply signif() to numeric dimension values to avoid incorrect selectors due to float comparison --- R/SelectorChecker.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/SelectorChecker.R b/R/SelectorChecker.R index 92e1d1b..fc778fb 100644 --- a/R/SelectorChecker.R +++ b/R/SelectorChecker.R @@ -91,7 +91,7 @@ SelectorChecker <- function(selectors, var = NULL, return_indices = TRUE, } } else if (is.numeric(selectors[[i]])) { if (is.numeric(var)) { - + var <- signif(var) tol <- 0 if (!is.null(tolerance)) { if (!is(tolerance, "numeric")) { @@ -99,7 +99,6 @@ SelectorChecker <- function(selectors, var = NULL, return_indices = TRUE, } tol <- tolerance } - val <- selectors[[i]] if (i == 1) { -- GitLab