I keep getting an error message stating unexpected string constant in R when trying to complete factor analysis. It always seems to be the last two lines of information which are causing the issue. From what I can tell I am not missing any quotation marks which I have learnt is a common error that occurs. Someone previously suggested not using quotation marks at all but I am unsure what to use instead. I have tried to identify basic packages which I need to include to complete the analysis. Is there a possibility that I am missing one?
> Model'Factor_1 =~ Q5 + Q7 + Q8 + Q10 + Q11
> Factor_2 =~ Q9 + Q12 + Q14 + Q15
> Factor_3 =~ Q17 + Q18 + Q19 + Q20 + Q25
> Factor_4 =~ Q22 + Q23 + Q24
> Factor_5 =~ Q27 + Q29 + Q31 + Q32 + Q36'
Error: unexpected string constant in:
"Factor_4 =~ Q22 + Q23 + Q24
Factor_5 =~ Q27 + Q29 + Q31 + Q32 + Q36'"
> Model'Factor_1 =~ Q5 + Q7 + Q8 + Q10 + Q11
> Factor_2 =~ Q9 + Q12 + Q14 + Q15
> Factor_3 =~ Q17 + Q18 + Q19 + Q20 + Q25
> Factor_4 =~ Q22 + Q23 + Q24
> Factor_5 =~ Q27 + Q29 + Q31 + Q32 + Q36
> Fit = cfa(model = Model, data = data, estimator = "ULSMV", ordered = true)
> Summary(Fit, fit = true)'
Error: unexpected string constant in:
"Fit = cfa(model = Model, data = data, estimator = "ULSMV", ordered = true)
Summary(Fit, fit = true)'"