I use a MacBook Pro 13" Retina (Late 2013) with OS X Yosemite 10.10.2. I wouldn't wish this upon my worst enemy. Well maybe.
Nightmare in chronological order:
I want to continue using R and RStudio. Questions:
Thanks!
How do I go about this without blowing up the Mac again?
Don't try to delete your swap file while the computer is running! If you start deleting random system files you're going to have a bad day.
How to install R and RStudio via Homebrew?
You can install R with brew install r
. You can install a binary RStudio using homebrew-cask, like brew install Caskroom/cask/rstudio
.
Do I need to install XQuartz first?
No, this should no longer be necessary.
What would happen if I install R and RStudio unbrewed?
Nothing bad; brew doctor
may report findings but these are not errors and you should not assume they represent problems, though they are helpful to maintainers like me if you seek help trying to diagnose build failures later.
What conflicts between R, RStudio and Homebrew should I recognize?
There are no important conflicts. If you install the compilers from http://r.research.att.com/libs/, which are unnecessary if you're using a brewed R, you may later have trouble installing things like gcc (which provides gfortran) from Homebrew.
Common quirks of having all of Homebrew, R, and RStudio installed?
As of August 2015 the comments below are no longer necessary; packages are now installed to /usr/local/lib/R/x.y/site-library by default and should survive minor R upgrades.
If you are using a brewed R and you would like your installed packages to survive minor R upgrades, you can run mkdir -p ~/Library/R/3.2/library
and then R will install packages to that path by default (placing the packages in your home directory and not in the Cellar).
How can I make Homebrew, R, and RStudio live happily ever after without burning down the house?
See above!