Installing "rgl" package in R, Mac OSX El Captian Installing "rgl" package in R, Mac OSX El Captian r r

Installing "rgl" package in R, Mac OSX El Captian


After talking with a colleague all I had to do was download XQuartz from here to install X11, and then install the source package again. Now it works!


Downloading XQuartz completely solved everything after I wasted hours trying to come up with a solution to this problem.


I first downloaded the package onto my desktop, but R gave me the same error, this is what worked for my Mac:

install.packages("rgl", lib="Desktop/rgl_0.96.0 (1).tgz") Warning in install.packages : 'lib = "Desktop/rgl_0.96.0 (1).tgz"' is not writable Would you like to use a personal library instead? (y/n) y Would you like to create a personal library ~/Library/R/3.3/library to install packages into? (y/n) y