Closed TDJorgensen closed 6 months ago
I inherited that line from lavaan, I think at the start of blavaan. For example, you can find it in lavaan here. I am not sure about the intent, and xxx_lavaan.R is totally different now, so some change is probably needed.
Are you getting this error with lavaan from github? (newer than 0.6-17?)
Yes, lavaan_0.6-18.2090 and blavaan_0.5-4
Is
length()
the right function here?The
?bcfa
help-page example leads to this error:And likewise for the
?bsem
help-page example.I can't tell if you are trying to detect
bsem
orbcfa
as the called function, then remove the "b
" to assign themodel.type=
. Perhapsnchar()
works? But this code exists only within the equivalentbcfa()
andbsem()
functions, so you already know it is one of those 2 calls. I would just remove the first character:Or just check
if (mc$model.type == "bcfa")
(or"bsem"
) to assign the right string.