⏱reading time: 2 min

As I explained in my previous post if you installed R with Homebrew you have less capabilities than with a R installed from CRAN’s binary. But, can you have all the capabilities while you still use Homebrew to install R? Yes! However… why you bother to install it with Homebrew at all instead of installing it from CRAN. Well, it’s true that CRAN install it’s easier. You just have to download the binary and that’s it. You can even use Homebrew Cask to install R that way

However, if you install that way you can’t take advantage of OpenBlas and OpenMP which really enhance the speed of R processing. Well, you can take advantage of OpenMP with CRAN install if you use the coatless professor method.

Getting all the capabilities

To make this possible we are going to install/reinstall R, and Cairo, with the formulae Seth Fore has in his tap, /homebrew-r-srf. These formulae are basically the same on /homebrew-science, which is a legacy tap (no longer updated), which we all were using to install R with Homebrew before they merge everything to Core. Seth updated both formulae for us, so we can enjoy the last version of R and Cairo while not loosing any capability.

You also have to remember that this instructions are just aimed to reinstall R if you have follow my previous instructions to have a 100% R install with Homebrew. And they would replace this section.

The first thing you have to do is uninstall R and Cairo if you have them installed:

If you have Cairo installed, it’s going to protest about dependencies, but don’t worry and we are just going to reinstall it in a minute.

When you don’t have R and Cairo in your system you can go ahead.

You begin tapping Seth’s tap.

Actually, you can avoid this step since Seth’s formulae have the same name as Homebrew Core ones we are forced to install them using the full name of the tap in combination with the formula name.

If you don’t have Xquartz already installed in your system you can install with:

Now, you can install Cairo.

When Cairo finish to build you can proceed with R.

To use the Pango flag --with-pango you must have installed in your system Pango brew install pango .

When it end to build, you can use use capabilities() in R console and you have to get something like this:

To finish I would run:

To reconfigure Java on R, just in case.


One thought on “Installing R with Homebrew with all the capabilities

Leave a Reply