How to Navigate RStudio - dummies

How to Navigate RStudio

By Andrie de Vries, Joris Meys

RStudio is a code editor and development environment with some very nice features that make code development in R easy and fun:

  • Code highlighting that gives different colors to keywords and variables, making it easier to read

  • Automatic bracket matching

  • Code completion, so you don’t have to type out all commands in full

  • Easy access to R Help, with some nice features for exploring functions and parameters of functions

  • Easy exploration of variables and values

Because RStudio is available free of charge for Linux, Windows, and Apple iOS devices, it’s a good option to use with R.

To open RStudio, click the RStudio icon in your menu system or on your desktop.


Once RStudio started, choose File→New→R Script.

You have four work areas:

  • Source: The top-left corner of the screen contains a text editor that lets you work with source script files. Here, you can enter multiple lines of code, save your script file to disk, and perform other tasks on your script.

    This code editor works a bit like every other text editor you’ve ever seen, but it’s smart. It recognizes and highlights various elements of your code, for example (using different colors for different elements), and it also helps you find matching brackets in your scripts.

  • Console: In the bottom-left corner, you find the console. The console in RStudio is identical to the console in RGui. This is where you do all the interactive work with R.

  • Workspace and history: The top-right corner is a handy overview of your workspace, where you can inspect the variables you created in your session, as well as their values. This is also the area where you can see a history of the commands you’ve issued in R.

  • Files, plots, package, and help: In the bottom-right corner, you have access to several tools:

    • Files: This is where you can browse the folders and files on your computer.

    • Plots: This is where R displays your plots (charts or graphs).

    • Packages: This is where you can view a list of all the installed packages. A package is self-contained set of code that adds functionality to R, similar to the way that an add-in adds functionality to Microsoft Excel.

    • Help: This is where you can browse the built-in Help system of R.