Skip to content

Commit

Permalink
[efa] convert data= to data.frame (if matrix or something else)
Browse files Browse the repository at this point in the history
  • Loading branch information
yrosseel committed Nov 18, 2024
1 parent 5a0e02b commit 597ae63
Show file tree
Hide file tree
Showing 2 changed files with 6 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: lavaan
Title: Latent Variable Analysis
Version: 0.6-20.2234
Version: 0.6-20.2235
Authors@R: c(person(given = "Yves", family = "Rosseel",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions R/xxx_efa.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ efa <- function(data = NULL,
# with the efa() modifier."))
#}

# if data= argument is used, convert to data.frame (eg matrix, tibble, ...)
if (!is.null(data)) {
data <- as.data.frame(data)
}

# handle ov.names
if (!is.null(data) && inherits(data, "lavMoments")) {
if ("sample.cov" %in% names(data)) {
Expand Down

0 comments on commit 597ae63

Please sign in to comment.