How To Install R and RStudio Desktop in macOS

We ever discussed How To Install R and RStudio Desktop in Ubuntu Linux 20.04. In this post, we introduce how to install R and RSTudio Desktop on macOS.

Install R environment

Install R environment as follows using Homebrew.

$ brew install R

Then verify that the R environment is installed and ready, by running in a Terminal,

$ R

and within the R REPL, run

> demo(nlm)

to verify whether it will show the demos and the graph.

Install RStudio Desktop on macOS

After the R environment is ready, we can move to to install the RStudio Desktop.

First, download the RStudio Desktop software package by visiting

Then, install the dmg package by drag-dropping the RStudio Desktop application to the Applications folder of macOS.

Verify the R and RStudio Desktop installation

Start RStudio Desktop by opening the RStudio program from the application launcher.

Then the RStudio Desktop window will show. In the Console panel, let’s run some demos and verify the environment:

> demo(nlm)

Hit Enter to start the demos. The results and plot will shows as follows.

Leave a Reply

Your email address will not be published. Required fields are marked *