File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
Package: lavaan
2
2
Title: Latent Variable Analysis
3
- Version: 0.6-20.2332
3
+ Version: 0.6-20.2333
4
4
Authors@R: c(person(given = "Yves", family = "Rosseel",
5
5
role = c("aut", "cre"),
6
6
email = "Yves.Rosseel@UGent.be",
Original file line number Diff line number Diff line change @@ -903,9 +903,22 @@ lavaanify <- lavParTable <- function(
903
903
}
904
904
}
905
905
906
- # put lhs of := elements in label column
906
+ # check defined variables (:=)
907
907
def.idx <- which(tmp.list $ op == " :=" )
908
- tmp.list $ label [def.idx ] <- tmp.list $ lhs [def.idx ]
908
+ if (length(def.idx ) > 0L ) {
909
+ # check if the lhs is unique (new in 0.6-20)
910
+ def.lhs <- tmp.list $ lhs [def.idx ]
911
+ dup.idx <- which(duplicated(def.lhs ))
912
+ if (length(dup.idx ) > 0L ) {
913
+ # warn or stop? warn for now
914
+ lav_msg_warn(gettextf(" at least one defined variable (using the :=
915
+ operator) has been duplicated, and will be
916
+ overwritten by the last one: %s" ,
917
+ paste(def.lhs [dup.idx ], collapse = " " )))
918
+ }
919
+ # put lhs of := elements in label column
920
+ tmp.list $ label [def.idx ] <- def.lhs
921
+ }
909
922
910
923
911
924
# handle effect.coding related equality constraints
You can’t perform that action at this time.
0 commit comments