Installing RStudio

Install and configure RStudio Desktop, the integrated development environment used throughout the course to write, run, organize, and troubleshoot R code.

What Is RStudio?

RStudio is an integrated development environment, commonly abbreviated as IDE. It provides a structured interface for writing scripts, running R commands, viewing plots, inspecting datasets, installing packages, and organizing analysis projects.

R and RStudio Are Different Programs

R is the programming language and computational engine. RStudio is an interface that makes R easier to use. R must be installed before RStudio.

Downloading RStudio Desktop

Open the official Posit download page and select the free version of RStudio Desktop for your operating system. Most learners should use the recommended installer automatically displayed for their computer.

  • Windows: Download the Windows installer, open the downloaded file, and accept the default installation options.
  • macOS: Download the macOS package, open it, and move RStudio into the Applications folder when prompted.
  • Linux: Download the package that matches your distribution and version, such as the appropriate Debian, Ubuntu, Fedora, or Red Hat package.

Verifying the Installation

Launch RStudio and locate the Console pane. Enter the commands below one at a time. RStudio should calculate the first expression and display information about your installed R environment for the second.

1 + 1

sessionInfo()

RStudio Cannot Find R

If RStudio opens but cannot start an R session, close RStudio, confirm that R was installed successfully, and then restart the computer. Reinstall R before reinstalling RStudio.

The Four Main RStudio Panes

  • Source: Where you write and save scripts.
  • Console: Where R executes commands and displays output.
  • Environment and History: Where you inspect objects created during the current session and review previously executed commands.
  • Files, Plots, Packages, and Help: Where you navigate files, view figures, manage packages, and read documentation.

Do Not Build an Analysis Only in the Console

The Console is useful for quick experiments, but commands entered there are not automatically preserved as a reproducible analysis. Write important commands in an R script and save the file.

Practical Assignment

Open RStudio and create a new R script by selecting File, New File, and R Script. Add the following commands to the script:

message <- "RStudio is working"

print(message)

Run both lines and confirm that the Console prints "RStudio is working." Save the script as rstudio_check.R in a folder that you can find again.

Lesson Metadata

Duration: 20 mins
Module Scope: Bioinformatics Bootcamp 2026: Computational Thinking for Biomedical Research