I\'m trying to install R using Homebrew. I ran these commands which are recommended elsewhere on SO:
brew tap homebrew/science brew install R
You can also install R from this page:
https://cran.r-project.org/bin/macosx/
It works out of the box