## Install quarto package ----
install.packages("quarto")
Windows 10/11
Prerequisites
The Windows Subsystem for Linux (WSL) enables you to access the power of both Windows and Linux at the same time on a Windows machine. WSL lets you install a Linux distribution (such as Ubuntu, OpenSUSE, Kali, Debian, Arch Linux, etc.) and use Linux applications, utilities, and Bash command-line tools directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
You must use Windows 10/11 to run WSL.
This module is required only to install Docker Desktop. You can ignore this step if you don’t plan to install Docker.
To install WSL, open PowerShell or Windows Terminal in Administrator mode by right-clicking and selecting “Run as administrator”, and enter the following command:
## Install Windows Subsystem for Linux ----
--install wsl
Restart your machine to complete the installation.
This command enables the features necessary to run WSL and install the Ubuntu distribution of Linux. After the reboot, a terminal will ask you to pick a username and a password for Ubuntu.
Finally, just ensure that you use the version 2 of WSL. Close and reopen PowerShell or Windows Terminal in Administrator mode by right-clicking and selecting “Run as administrator”, and enter the following command:
## Set WSL default version ----
--set-default-version 2 wsl
That’s it! You have install Ubuntu as a Windows App.
Keep your Ubuntu distribution up-to-date by running:
## Update Linux packages ----
sudo apt update && sudo apt upgrade
Installation
Software | Description | Website |
---|---|---|
R | The R environment | link |
Rtools | A toolbox to build R packages from source | 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 Chocolatey, a package manager for Windows. A package manager is a way to get software (and software updates) onto your machine without much work on your part. It’s the Windows equivalent of yum
, pacman
or apt-get
.
To install Chocolatey, open PowerShell or Windows Terminal in Administrator mode by right-clicking and selecting “Run as administrator”, and enter the following command:
## Install Chocolatey Package Manager ----
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Check your installation by running:
## Get Chocolatey version ----
--version
choco # Chocolatey v2.3.0
It’s time to install the required softwares:
## Install R environment ----
r r.studio rtools
choco install
## Install git ----
choco install git
## Install literate programing tools ----
choco install pandoc quarto
## Install Docker ----
choco install docker-desktop
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
# "C:\\PROGRA~1\\Git\\cmd\\git.exe"
## Check if Rtools is installed ----
Sys.which("make")
# make
# "C:\\rtools44\\usr\\bin\\make.exe"
## Check if Pandoc is installed ----
Sys.which("pandoc")
# pandoc
# "C:\\PROGRA~3\\CHOCOL~1\\bin\\pandoc.exe"
## Check if Quarto is installed ----
Sys.which("Quarto")
# Quarto
# "C:\\PROGRA~3\\CHOCOL~1\\bin\\Quarto.exe"
## Check if LaTeX is installed ----
Sys.which("pdflatex")
# pdflatex
# "C:\\Users\\janedoe\\AppData\\Roaming\\TinyTex\\bin\\windows\\pdflatex.exe"
## Check if Docker is installed ----
Sys.which("docker")
# docker
# "C:\\PROGRA~1\\Docker\\Docker\\RESOUR~1\\bin\\docker.exe"
## Install package from sources ----
install.packages("jsonlite", type = "source")
Keep your Windows Apps up-to-date by running:
## Check for updates ----
choco outdated
## Update Windows Apps ----
choco upgrade all
Configuration
You’ve just installed a working environment for data science w/ , , and .
Now follow instruction to configure your system.