CFA does not work anymore even though I didn't change anything!!

hi guys! Just yesterday I wrote some code to perform a simple CFA. Everything worked perfectly yesterday but today it doesn't work even though I didn't change anything??

I always get this error message:
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") : cannot open file '
# CFA
glw_nach =~ nach1 + nach2 + nach3 + nach4 + nach5
glw_marke =~ mar1 + mar2 + mar3 + mar4 + mar5
kb =~ kb1 + kb2 + kb3
': Invalid argument

This is my R code:

ba_data <- read_excel("ba_umfrage_v05_R.xlsx")
ba_data$inf <- recode(ba_data$typ, "1=1; 2=0")

m_model <- '
    
    # CFA
    glw_nach =~ nach1 + nach2 + nach3 + nach4 + nach5 
    glw_marke =~ mar1 + mar2 + mar3 + mar4 + mar5
    kb =~ kb1 + kb2 + kb3
'
m_fit <- cfa(m_model, data=ba_data)

summary(m_fit,
        standardized = TRUE,
        rsquare = TRUE,
        fit.measures = TRUE)

I've also attached some pictures! Hope someone can help me! Thanks!!

I have also made sure that the R file and the xlsx are in the same folder

Use getwd() to understand where your sessions current working directory is.

This topic was automatically closed 21 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.