rhomebrew

Installing R with Homebrew


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

For brew tap homebrew/science, I'm receiving this error:

Error: Already tapped!

For the second command, I receive this:

Error: No available formula for r 

Any suggestions?


Solution

  • As of 2017 / Brew 1.3.2 @ macOS Sierra 10.12.6 all you have to do is:

    $ brew install r
    

    You don't even need to tap homebrew/science since r is now a part of core formulae for the Homebrew (homebrew-core).

    It will also install all dependencies automatically:

    ==> Installing dependencies for r: gmp, mpfr, libmpc, isl, gcc
    

    There are two additional options you might want to know:

    --with-java
    Build with java support
    --with-openblas
    Build with openblas support