Skip to content

Commit

Permalink
added cstsem install test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandmaier committed Apr 8, 2024
1 parent e2ad7d0 commit 22a7126
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/semtree.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ semtree <- function(model, data = NULL, control = NULL, constraints = NULL,
} else if ((inherits(model, "ctsemFit")) || (inherits(model, "ctsemInit"))) {
# if (control$verbose) { ui_message("Detected ctsem model.") }
control$sem.prog <- "ctsem"

ctsemomx_omx_installed <- "ctsemOMX" %in% installed.packages()[,"Package"]
if (!ctsemomx_omx_installed) {
stop("Please install ctsemOMX first.")
}

} else {
ui_stop("Unknown model type selected. Use OpenMx or lavaanified lavaan models!")
}
Expand Down

0 comments on commit 22a7126

Please sign in to comment.