4 Installing R and R Studio Mac, Linux & Windows
Installing R and R Studio is relatively straightforward on all three major operating systems! Here’s a guide for each:
Mac:
Go to the CRAN Website: Visit the Comprehensive R Archive Network (CRAN) website at
Download R for macOS: Click on “Download R for macOS” and choose the latest version.
Open the Downloaded File: Double-click the downloaded .pkg file and follow the installation prompt.
Install RStudio: Go to the RStudio website at and click “Download RStudio.”
Choose Your Version: Select the appropriate version for your macOS version (e.g., RStudio Desktop for macOS 12+) and download it.
Run the Installer: Double-click the downloaded .dmg file and follow the installation instructions.
Linux:
Open a Terminal: Launch a terminal window.
Add CRAN Repository (Optional): This enables automatic updates later. For Debian/Ubuntu, run sudo apt-get install -y software-properties-common && sudo add-apt-repository ppa:ubuntugis/ppa. For Fedora, run sudo dnf config-manager –add-repo
Install R: Install R based on your package manager:
Debian/Ubuntu: sudo apt-get install r-base
Fedora: sudo dnf install R
Other distributions: Find the appropriate package name for your distribution and use your package manager to install it.
Install RStudio: Download the appropriate .deb or .rpm file for your distribution from and install it using your package manager.
Windows:
Download R for Windows: Go to and click “Download R for Windows.”
Choose Your Version: Select the appropriate version for your Windows version (e.g., R for Windows x86_64) and download the .exe file.
Run the Installer: Double-click the downloaded .exe file and follow the installation instructions.
Install RStudio: Download the appropriate .exe installer for your Windows version from and run it to install RStudio.
Additional Tips:
Make sure you have administrative privileges to install software.
Check the CRAN website for the latest versions of R and RStudio.
Consider setting up R and RStudio paths for easier access from command line.
Look for online tutorials and communities for support and learning resources.
[ad_2]
source