Improving your R setup

Syntax Highlighting

One of the first things you should do is enable syntax highlighting of functions. This isn’t on by default. Turning it on allows you to visually distinguish between functions and variables far more easily.

Go to Tools -> Options (or Global Options for Mac) on the menu, choose Code on the left of the pop-up and the Display tab as follows:

highlight R function call image

Then ensure the Highlight R function calls is ticked.

Also, you may notice that the color formatting of comments and quoted text are almost identical in color with the default Editor theme Textmate. You can change this by clicking on the Appearance option on the left of the same screen above, and choosing a different Editor Theme. I find Crimson Editor to contrast the different elements of code the most.

However if you have used R for a while and have gotten somewhat used to the colors, the SQL Server theme is probably closer. Dawn is also not a bad one.

change r theme