Install R, RStudio, and Quarto (Mac) — Interactive Checklist Form

Objective

This guide explains, step by step, how to install:

  • R
  • RStudio
  • Quarto
  • A simple test project to confirm everything is working

Review Information

Name

Date

Overall Comments

Before You Start

You need:

  • A Mac computer
  • Internet access
  • Permission to install software

It is a good idea to close unnecessary programs before starting.

Step 1 — Download R for Mac

  1. Open your web browser.

  2. Go to https://cran.r-project.org.

  3. Click Download R for macOS.

  4. Download the latest .pkg installer for macOS.

  5. Wait for the file to finish downloading.

Step 2 — Install R on Mac

  1. Open the downloaded R .pkg installer.

  2. Click Continue through the installation steps.

  3. Click Install.

  4. Enter your Mac password if asked.

  5. Wait for installation to complete.

  6. Click Close when finished.

Step 3 — Verify R Installation

  1. Open Terminal.

    • Open Finder
    • Go to Applications > Utilities
    • Open Terminal
  2. Type:

R --version
  1. Press Return.

You should see something like:

R version 4.x.x
  1. You can also test by opening RStudio later and typing:
version

Step 4 — If R Does Not Work

If R is not found:

  1. Close Terminal.

  2. Install R again from CRAN.

  3. Open a new Terminal window.

  4. Test again with:

R --version

Step 5 — Download RStudio for Mac

  1. Open your web browser.

  2. Go to https://posit.co/download/rstudio-desktop/.

  3. Download the RStudio Desktop installer for macOS.

  4. Wait for the file to download.

Step 6 — Install RStudio on Mac

  1. Open the downloaded RStudio file.

  2. Drag RStudio into the Applications folder.

  3. Open Applications.

  4. Double-click RStudio.

  5. If macOS shows a security message, click Open.

Step 7 — Download Quarto for Mac

  1. Open your web browser.

  2. Go to https://quarto.org/docs/get-started/.

  3. Download the Quarto installer for macOS.

  4. Wait for the .pkg file to download.

Step 8 — Install Quarto on Mac

  1. Open the downloaded Quarto installer.

  2. Click Continue through the installation steps.

  3. Click Install.

  4. Enter your Mac password if asked.

  5. Wait for installation to complete.

  6. Click Close.

Step 9 — Verify Quarto Installation

  1. Open Terminal.

  2. Type:

quarto --version
  1. Press Return.

You should see something like:

1.x.x
  1. If the command is not found, close Terminal, reopen it, and test again.

Step 10 — Open RStudio and Confirm It Starts

  1. Open RStudio.

  2. Wait for the program to finish loading.

  3. Confirm that the Console panel appears.

  4. In the Console, type:

version
  1. Press Return.

Step 11 — Create a Working Folder

  1. In Finder, create or choose a folder for your work.

Example:

/Users/YourName/Documents/R-Projects
  1. Open RStudio.

  2. Use File > New Project or File > Open File… later when needed.

Step 12 — Create a Test Quarto File

  1. In RStudio, click:
File > New File > Quarto Document
  1. Choose HTML.

  2. Save the file as:

test-quarto-mac.qmd
  1. Replace the content with:
---
title: "My First Quarto Report"
format: html
---

# Hello Yahya

R, RStudio, and Quarto are working on Mac.

Step 13 — Render the Test File

  1. In RStudio, open test-quarto-mac.qmd.

  2. Click the Render button.

  3. Wait for the HTML output to open.

Expected result:

A web page appears showing the title and the message.

Step 14 — Install Common R Packages

In the RStudio Console, type:

install.packages("tidyverse")
install.packages("ggplot2")
install.packages("readxl")

Press Return after each line, or paste all lines together.

Step 15 — Check Installed Packages

In the RStudio Console, type:

installed.packages()[, "Package"]

Look for packages such as:

  • tidyverse
  • ggplot2
  • readxl

Step 16 — Automatic Environment Check

This section displays the detected R version and Quarto version when this QMD file is rendered successfully.

If this section renders correctly, then R is installed and Quarto is available to render the document.

cat("R detected: ", R.version.string, "\n", sep = "")
R detected: R version 4.3.2 (2023-10-31 ucrt)
quarto_path <- Sys.which("quarto")
if (nzchar(quarto_path)) {
  cat("Quarto executable: ", quarto_path, "\n", sep = "")
} else {
  cat("Quarto executable: Not found in PATH\n")
}
Quarto executable: C:\PROGRA~1\Quarto\bin\quarto.exe
quarto_version <- tryCatch(
  system2("quarto", "--version", stdout = TRUE, stderr = TRUE),
  error = function(e) paste("Could not run quarto --version:", conditionMessage(e))
)
cat("Quarto version check:\n")
Quarto version check:
cat(paste(quarto_version, collapse = "\n"))
1.6.40

Step 17 — Useful Mac Notes

  • On Mac, you can use Terminal to test both R --version and quarto --version.
  • If RStudio does not immediately see the tools, restart RStudio.
  • If Terminal does not see the new installation, close and reopen Terminal.
  • Quarto is often installed system-wide and works automatically with RStudio.

Troubleshooting

Problem 1 — R not recognized

Fix:

  • Reinstall R from CRAN
  • Open a new Terminal window
  • Test again with R --version

Problem 2 — quarto not recognized

Fix:

  • Reinstall Quarto from quarto.org
  • Close and reopen Terminal
  • Test again with quarto --version

Problem 3 — RStudio opens but cannot render

Fix:

  • Confirm Quarto is installed
  • Restart RStudio
  • Open the QMD file again
  • Try Render one more time

Problem 4 — Package installation fails

Try again in the RStudio Console with:

install.packages("tidyverse")

Then repeat for the other packages.

Summary

You have now completed the following:

  • Installed R on Mac
  • Installed RStudio
  • Installed Quarto
  • Verified R and Quarto
  • Created and rendered a test QMD file
  • Installed common R packages

Next Suggested Step

Create a second Quarto file and add:

  • One heading
  • One paragraph
  • One R code chunk
  • One simple plot

Then render it to HTML.