This is an old revision of the document!


Panes in RStudio

There are generally four panes in RStudio, which are labeled 1 through 4 on this image:

RStudio Panes

RStudio does allow you to move panes in the options menu, but this layout is the default when you first log in, so we’ll act as though it’s standard.

Pane 1: View Files and Data

This pane appears by default in the top left of the RStudio interface. When you click on a data file in the Workspace pane, or open a file from the Files pane, the results will appear in Pane 1. Each file opens in its own tab, and you can navigate between tabs by clicking on them (or using keyboard shortcuts).

Pane 2: See Workspace and History

This pane appears by default in the top right of the RStudio interface. The Workspace tab is generally the tab that is selected, and includes a list of all the objects you have loaded into your workspace. For example, all datasets you have loaded will appear here, along with any other objects you have created (special text formats, vectors, etc). If you click on the History tab, you will see the complete history of code you have typed, over all sessions, as in this image:  The history tab The history is searchable, so you can use the search box at the upper right of the pane to search through your code history. If you find a line of code you want to re-run, just select it and click the “To Console” button: Send to Console

Pane 3: See Files, Plots, Packages, and Help

This pane appears by default in the bottom right, and by default opens on the Files tab.

Files

This tab shows you all the files you have saved in your RStudio account. The buttons across the top of the tab allow you to upload additional files, delete files, rename files, and many more functions.

Plots

When you run code in the Console that creates a plot, the Plots tab will be automatically selected, as shown in Figure 6. Any time you want to view plots, you can select this tab manually, but it will be selected when you run plot code. Notice the arrow buttons at the top left of the pane; these allow you to scroll through all the plots you have created in a session.

The Plots Tab

Packages

This tab allows you to see the list of all the packages (add-ons to the R code) you have access to, and which are loaded in already. We won’t be using this much, but see Figure 7 for a screenshot of the tab.

The Packages Tab

Help

This tab will be automatically selected whenever you run help code in the Console,

help(plot)

but you can access it at any time by clicking on the tab. To see what the Help tab looks like,

The Help Tab

If you want to use Help without using the help command, you can also use the search bar at the upper right of the tab to search within the R documentation.

Pane 4: Console

By default at the bottom left, this is the most important pane– the Console! This is where you enter your R code to do everything in the curriculum. The rest of the document will be largely concerned with working in the Console, with occasional references to other panes.

Print/export