I am running some simple textbooks commands which work perfectly well on windows R but are given this error when run on Mac R: rror: unexpected input in "ddd<-fuel[,"Carbon"]
I have OS X Yosemite Version10.10.5 and R 3.2.3
This often means something has corrupted input. For example, on a Mac the textedit application changes " to ”, which R doesn't recognize as a double quote. The solution is to use the editor in the R GUI (or another programming editor) rather than something intended for word processing.
If that's not it, please give a reproducible example, and the output from sessionInfo() so we know which R version you're using.