Issues installing ggplot2

I am trying to follow a machine learning tutorial and I have come to the point where it is requiring me to install ggplot2. By the title, you should have gathered that this is my present issue.

First, let me state that I am on a 13-inch Macbook Pro, macOS Mojave Version 10.14.6. I am using RStudio 1.1.456, launched from Anaconda Navigator.

I cannot download the package ggplot2. No matter what I do, there are errors. Below, I have copy/pasted the response I get when running the code. I've tried running it in sections and running it as a whole, I've shut down the program and the computer only to turn everything on again and be received by the same message:


I have searched for help online and have successfully downloaded rlang before trying to install ggplot2 once more, once again to no avail.

Anaconda is a fabulous Python tool. I couldn't live without it.

It has also been nothing but bad luck and trouble when it comes to R and RStudio interaction. From the logs, it also appears as if there may be issues with the compilation toolchain.

Yesterday, a similar issue was resolved by using Anaconda to install R.

Recommended for macOS

  1. Stay reasonably close to the latest macOS release
  2. Download and install R from CRAN (notarized and signed)
  3. Install for all users as the system administrator
  4. Download and install XCode from the App Store
  5. Install the command line tools from the terminal
    $ xcode-select install
  6. Use the R GUI to install packages
  7. When asked whether to install a later version from source, either decline and take the binary (pre-compiled) or try. If you get an exit 1 error, give up and take the binary instead.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.