Skip to content

Commit

Permalink
avoid verbose error coming from lavaan 0.6-18
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmerkle committed Jun 9, 2024
1 parent 0f1e8f3 commit 14dffce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: blavaan
Title: Bayesian Latent Variable Analysis
Version: 0.5-4.1279
Version: 0.5-4.1280
Authors@R: c(person(given = "Edgar", family = "Merkle",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
9 changes: 9 additions & 0 deletions R/blavaan.R
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ blavaan <- function(..., # default lavaan arguments
if(!inherits(LAV2, 'try-error')) LAV <- LAV2
}

## ensure verbose appears in lavoptions, for 0.6-18 (FIXME also warn/debug?)
if(!("verbose" %in% names(LAV@Options))) {
if(!("verbose" %in% names(dotdotdot))) {
LAV@Options$verbose <- FALSE
} else {
LAV@Options$verbose <- dotdotdot$verbose
}
}

if(LAV@Data@data.type == "moment") {
if(target != "stan") stop('blavaan ERROR: full data are required for ', target, ' target.\n Try target="stan", or consider using kd() from package semTools.')
}
Expand Down

0 comments on commit 14dffce

Please sign in to comment.