## Install quarto package ----
install.packages("quarto")
macOS
Installation
Software | Description | Website |
---|---|---|
R | The R environment | link |
XQuartz | Graphical window system | link |
RStudio Desktop | Integrated development environment (IDE) for R | link |
Pandoc | Document converter used by rmarkdown |
link |
Quarto CLI | Scientific publishing system built on Pandoc | link |
Git | Version control software | link |
Docker Desktop | Containerization software | link |
We are going to install the required software by using Homebrew, a package manager for macOS. A package manager is a way to get software (and software updates) onto your machine without much work on your part. It’s the macOS equivalent of yum
, pacman
or apt-get
.
Before installing Homebrew, we need to install the Apple software Xcode Command Line Tools. It is a self-contained package for software developers who wish to build Mac apps using UNIX-style commands.
Open a Terminal, run this line and accept the license:
## Install Xcode Command Line Tools ----
sudo xcode-select --install
We can now install Homebrew itself by running:
## Install Homebrew ----
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
## Check installation ----
brew --version
# Homebrew 4.3.23
## Update repositories (list of available software) ----
brew update
It’s time to install the required softwares:
## Install utilities for R ----
brew install --cask xquartz ## Graphical window system
brew install gfortran ## FORTRAN compiler for GCC
## Install R ----
brew install --cask r
## Install RStudio Desktop ----
brew install --cask rstudio
## Install git ----
brew install git
## Install pandoc ----
brew install pandoc
## Install Quarto ----
brew install --cask quarto
## Install Docker ----
brew install docker
In addition, we need to install the package quarto
:
Finally, let’s install a LaTeX
distribution to convert documents from .Rmd
(or .qmd
) to .pdf
. We are going to install a lightened distribution w/ the package tinytex
.
## Install tinytex package ----
install.packages("tinytex")
## Install LaTeX distribution ----
::install_tinytex() tinytex
If you already have a LaTeX
distribution, do not use tinytex
.
Check
Restart your machine.
Open RStudio and run:
## Get R version ----
R.version.string# "R version 4.4.2 (2024-10-31)"
## Check if git is installed ----
Sys.which("git")
# git
# "/usr/bin/git"
## Check if make is installed ----
Sys.which("make")
# make
# "/usr/bin/make"
## Check if Pandoc is installed ----
Sys.which("pandoc")
# pandoc
# "/usr/local/bin/pandoc"
## Check if Quarto is installed ----
Sys.which("Quarto")
# Quarto
# "/usr/local/bin/Quarto"
## Check if LaTeX is installed ----
Sys.which("pdflatex")
# pdflatex
# "/usr/local/bin/pdflatex"
## Check if Docker is installed ----
Sys.which("docker")
# docker
# "/usr/local/bin/docker"
## Install package from sources ----
install.packages("jsonlite", type = "source")
Keep your macOS Apps up-to-date by running:
## Check for updates ----
brew update
## Update macOS Apps ----
brew upgrade --greedy
Configuration
You’ve just installed a working environment for data science w/ , , and .
Now follow instruction to configure your system.