Any sufficiently advanced technology is equivalent to magic.

Top

Site Menu

Introduction to RStudio

Differences between R and RStudio

Here are screenshots of what R (left) and RStudio (right) look like:


A screenshot of the RGui interface on Windows. The R Console window is open, displaying the startup message for R version 4.1.0, including copyright information, license details, and instructions for using help and quitting R. At the bottom of the console is an empty command prompt indicated by a red ‘>’ symbol.A screenshot of the RStudio interface. The top-left pane is an empty script editor titled ‘Untitled1.’ The bottom-left pane shows the R Console displaying the startup message for R version 4.1.0. The top-right pane is the Global Environment, which is empty. The bottom-right pane displays the Files tab, showing a list of files and folders in the current directory, including items like ‘.Rhistory,’ ‘1A-single_Venn.tiff,’ and several TIFF images.

Using an analogy from Moderndive.com, R is like the engine of your car, while RStudio is like the dashboard. The R language runs the computations, like an engine, while RStudio's interface makes it easier to understand and use the "engine", R. We will use RStudio for all of our R analyses because it not only gives us access to the engine, but the interactive features that allow us to use R more effectively.

RStudio Layout

RStudio is separated into four panes and shown below are some of the more useful features in each pane:

Script WindowEnvironment,
 History
  
Console WindowFiles, Plots,
 Packages, Help
  

RStudio Personalization

One final thing you can do to make coding in R more fun, you can customize the look of your RStudio to fit your preference!

Appearance

To change the theme or font of your RStudio, go to the Tools menu at the top, then go to Global Options. Under the Appearance tab, you can change the Editor Theme, font, and font size.

Pane Layout

To change the layout of the four panes in RStudio, go to the Tools menu at the top, then go to Global Options. Under the Pane Layout tab, you can change where each of the panes are situated and which tabs are in each pane.

Video Tutorial: