From 3e6516a8c0f6820923cdae56e0fa7d7bc6dfb257 Mon Sep 17 00:00:00 2001 From: maltelueken Date: Mon, 9 Oct 2023 16:51:01 +0200 Subject: [PATCH] Add error message for empty local test tables --- R/classicProcess.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/classicProcess.R b/R/classicProcess.R index 4bd0363..cbdbc18 100644 --- a/R/classicProcess.R +++ b/R/classicProcess.R @@ -1593,7 +1593,7 @@ procModelGraphSingleModel <- function(modelOptions, globalDependent, options) { overtitle = gettextf("%s%% Confidence Interval", options$ciLevel * 100)) if (testType == "cis" && any(sapply(dataset, is.factor))) { - localTestTable$setError(gettext("Linear test type cannot be applied to factor variables. Choose a different test type.")) + localTestTable$setError(gettext("Linear test type cannot be applied to factor variables. Choose a different test type or remove all factor variables from the model.")) return() } @@ -1638,6 +1638,9 @@ procModelGraphSingleModel <- function(modelOptions, globalDependent, options) { localTestTable[["ci.lower"]] <- localTestResult[[paste0(((1-options$ciLevel)/2)*100, "%")]] localTestTable[["ci.upper"]] <- localTestResult[[paste0((1-(1-options$ciLevel)/2)*100, "%")]] } + } else { + localTestTable$setError(gettext("The specified model does not imply any (conditional) independencies that can be tested.")) + } }