Skip to content

RStudio Tips and Tricks

This document will walk you through doing development using RStudio and introduce you to some cool tips and tricks. You can install RStudio on your personal machine, or you can use RStudio in the cloud.

While the cloud version of RStudio is free, it does require an internet connection to do your work. The advantage of using the cloud version is that you don't have to install and configure all the tools on your local machine. The disadvantage is that you need an internet connection to do your work and you can't customize the environment as much as you can on your local machine. So if you are going to be traveling to a conference or a workshop and you have a 14 hour flight to get there, you might want to install RStudio on your local machine.

The rest of this document assumes you are using RStudio on your local machine.

Install R and RStudio

Customize RStudio

Here are my list of customizations that I like to do in RStudio:

  • Tools -> Global Options -> Appearance -> Editor Theme: Solarized Light
  • Tools -> Global Options -> Code -> Display -> Show margin: 80
  • Tools -> Global Options -> Code -> Display -> Highlight R function calls: checked
  • Tools -> Global Options -> Code -> Display -> Highlight selected word: checked
  • Tools -> Global Options -> Code -> Display -> Use rainbow parentheses: checked
  • Tools -> Global Options -> Code -> Saving -> Ensure that source files end with a newline: checked
  • Tools -> Global Options -> Code -> Saving -> Strip trailing whitespace before saving: checked
  • Tools -> Global Options -> Code -> Diagnostics -> TURN ON EVERYTHING

Released under the MIT License.