Error message of lavaan

install.packages("lavaan")
library(foreign)
library(lavaan)
mydata <- read.spss("assignment4(2023).sav", to.data.frame = TRUE)

list out variable

ls(mydata)

specify Model 1 (Simple Regression)

model1 <- "

regression Equation

SWLS ~ SCON
"
fit1 <- lavaan(model1, data=mydata, fixed.x=FALSE, auto.var=TRUE)
Summary(fit1)

when i run these commands, the error message appears:
"One or more of the packages to be updated are currently loaded. Restarting R prior to install is highly recommended. RStudio can restart R before installing the requested packages. All work and data will be preserved during restart. Do you want to restart R prior to install?"

clicked yes but this just keeps reopening

Avoid installing libraries as part of scripts and do it separately.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.