Thank you so much for both of you!
I am trying to run Structural Equation Modeling with Lavaan. Thus, I tried this code below. But when I used "=~" symbol, it doesn't work. Could you let me know how to handle this?
practice <- as.formula(paste("=~", paste0("aaqii", 1:8, collapse = "+")))
#> Error in str2lang(x): <text>:1:1: unexpected '='
#> 1: =
#> ^