I you use R and find that certain programs refuse to install (using install.packages) it’s no doubt that you’re using R from within Anaconda.
Anaconda is a package for statistical analysis. In general Anaconda is useful for a variety of Python related packages. However, R is also provided as an application from within the Anaconda framework.
There is a downside in using Anaconda… While it works very well for things like python libraries, and frameworks, it causes a hiccup with R. You might get errors like this one:
error: cannot run C++ compiled programs.
I haven’t found a way to get around this in Anaconda.
The best way I’ve found to bypass this is to install R directly.
Once you install R directly this permission issue is resolved.