Skip to content

Commit

Permalink
Add error message for nonmatching local test type
Browse files Browse the repository at this point in the history
  • Loading branch information
maltelueken committed Sep 19, 2023
1 parent 5a056da commit 0cae0e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/classicProcess.R
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,11 @@ ClassicProcess <- function(jaspResults, dataset = NULL, options) {
localTestTable$addColumnInfo(name = "ci.upper", title = gettext("Upper"), type = "number", format = "sf:4;dp:3",
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."))
return()
}

parTable <- lavaan::parTable(procResults)
parTable <- parTable[parTable$op != ":=" & !grepl(":|__", parTable$rhs) & !grepl(":|__", parTable$lhs),]

Expand Down

0 comments on commit 0cae0e1

Please sign in to comment.