Error: unexpected ' } ' in " } "

Hi, I am trying to do this in RStudio but it keeps telling me that there is an error: unexpected ' } ' in " } ". I checked all the parenthesis for any mistake but I believe they are well used. I am new to R so any help is welcome.


Hi Trini :slight_smile:
The problem isn't with the curly bracket itself, it's the other brackets. You have 11 open brackets "(" and only 10 close brackets ")" so R gets confused when it encounters the curly bracket!
Hope that helps!

1 Like

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