1.6 Introduction to RStudio

Important Buttons

A screenshot of an RStudio window highlighting buttons for creating new files (top left), opening an RStudio project (top right). The main portion of the window shows the four panes in a default RStudio interface. The editor pane (top left), contains text files that may contain R or python code. The terminal/console pane (bottom left), contains the R console, system terminal, and a tab for background jobs. The top right pane contains the environment, history, connections, and tutorial tabs by default, and may also contain tabs labeled build and git, depending on your project setup. The environment tab shows you what objects are currently in your programming environment - that is, what things are defined. The bottom right pane contains the files, plots, packages, help, viewer, and presentation tabs. By default, the files tab will show you your current working directory; if you are not working in a project, then it will show your home directory, which is the default working directory.

The File Editor (Top Left)

Screenshot of the RStudio editor window in R script mode. Lines are numbered along the left side. Editor style can be toggled between source and visual mode. There is a run button at the top to run the current or selected line(s), and an additional shortcut to source the script. An indicator in the bottom right tells you what kind of file you are looking at. In the bottom left, you can see the line:character that is being edited.

The File Editor (Top Left)

Screenshot of the RStudio editor window in quarto markdown mode. Lines are numbered along the left side. Editor style can be toggled between source and visual mode. There is a render button at the top to run the whole document, and additional shortcuts to add code chunks and run the selected code chunk. An indicator in the bottom right tells you what kind of file you are looking at. In the bottom left, you can see the line:character that is being edited.

The File Editor (Top Left)

Screenshot of the RStudio editor window in text mode. Lines are numbered along the left side. Editor style can be toggled between source and visual mode. An indicator in the bottom right tells you what kind of file you are looking at. In the bottom left, you can see the line:character that is being edited.

The Console Pane (Bottom Left)

Screenshot of the RStudio console. Notice that there is an icon indicating what language the console is currently running.

Environment Tab (Top Right)

Screenshot of the environment pane. There is an indicator of which language's environment is shown, a way to clear the environment, and pairs of variable names and values.

History Tab (Top Right)

RStudio history pane. This pane preserves all commands that have been run from the console or from evaluating code cells or scripts.

Files Tab (Bottom Right)

Screenshot of RStudio file tab, showing files, size, and last modified date. The folder path is shown just below the icon row and can be useful if you don't know where your files are located.

Packages Tab (Bottom Right)

Packages tab of RStudio. Checkboxes in the far left column show whether packages are loaded. Links to the package name can be clicked to access package documentation. The 3rd column is the package version, which should be verified and updated if you're having issues with the package's functions.

Help tab (Bottom Right)

Screenshot of RStudio help tab. Search bar is highlighted and annotated with 'search for function name here', and then the main window is annotated with 'Documentation appears here'.

The Viewer Tab (Bottom Right)

A screenshot of RStudio showing the Viewer tab, which displays HTML and PDF documents compiled from quarto or Rmarkdown.