Error on opening RStudio Error: 14:5: unexpected symbol 14: set a

The line of code you're referring to gets run when using the Object Explorer (e.g. for when you call View() on a list). Do you have any such tabs open? Can you share what kind of object you're viewing?