Skip to content

Commit

Permalink
Add error message for empty local test tables
Browse files Browse the repository at this point in the history
  • Loading branch information
maltelueken committed Oct 9, 2023
1 parent efc60cf commit 3e6516a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/classicProcess.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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."))

}
}

Expand Down

0 comments on commit 3e6516a

Please sign in to comment.