Navigating R Studio for programming

Silvie Cinková

2025-07-18

The four panes of RStudio

File, Console, Environment, and Files tabs

Console

  • Command line of the bare R

  • Type a command (e.g. 1 + 1) and hit Enter to execute it.

  • Console displays the output.

  • > at line start: R is ready to accept your next command

  • Console does not save your scripts. Use files to save your work.

  • Clear Console: hit the broom icon or Ctrl + L.

De-clutter the Console with the broom icon.

File formats for writing scripts

File formats for writing R scripts

Run a script with comments

Comment your code correctly.

Highlight and run a line or several lines or source the whole file at once.

Environment pane

  • lists objects currently loaded in R

    • variables

    • functions you have written

  • Delete objects with the broom icon.

    • Toggle List and Grid view.

    • Grid view can mark individual objects for deletion.

Environment with objects in Grid View

Packages pane

Installed packages You typically install packages from https://cran.r-project.org/

Install packages

Get Help

Plots pane

  • plots output from Console/R file
  • you can export them interactively

Plots pane