unexpected symbol for model

hi, I don't know what I have done wrong please help me.

model1=lm(`unemployment rate`~inflation rate)

I can't run the data, it keeps state that error unexpected symbol from the data

The unexpected symbol is due to the spaces between the variable names. Change the data frame, which I'll call DF and run

model1 <- lm(unemployment_rate~inflation_rate, data = DF)

I'm sorry but still cant

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

1 Like

Change the column names in the data frame, too.

In the original line of code, why are there quuotation marks around unemployment rate ?

That's an attempt to compensate for the blank.