I am running R 3.6.1 on a Mac Mini running Sierra and a MacBook Pro running El Capitan. I normally get all the R packages that I need from CRAN or github and use them without issues, but I am trying to install and use an R package (NicheMapR) that requires a fortran compiler and this is giving me issues. Even after installing gfortran, the R package still does not work (the fortran code seems to be compiled but the package installation fails). The package developer suggested that installing R via homebrew might solve the problem. On the contrary, my hunch is that it would lead to a world of pain, to quote Walter from the Big Lebowski. My questions are:
- What is the advantage of a homebrew version of R for MacOSX over the "regular" version installed from CRAN?
- Can the two versions coexist?
- Is the homebrew version going to affect the regular one?
Finally: is homebrew going to help or will it simply open a whole new can of worms?
Many thanks in advance.
Yes, installing from
homebrewis a recipe for pain. It's specifically recommended against by the official CRAN binary maintainer see his remarks from March 2016 onr-sig-mac.Regarding your questions, this can be summarized as:
Positives: Select your own BLAS and easily work with geospatial tools.
Downsides: Always needing to compile each R package.
Yes. The
homebrewversion installs into a different directory. But, watch out for library collision (see next question). However, you will have to deal with symbolic linking regarding what version of R is accessible from the console and you will also need to look into using RSwitch to switch between R versions.Yes and no. Unless you know what you're doing, opt for the CRAN version of R and its assorted goodies.