I initially tried, using RStudio, to install rgl
using install.packages("rgl")
, which appeared to have worked. It did give me a message that the binary is older than the source, and that it would install from the binary, but I received no other messages. However library(rgl)
gets stuck and doesn't do anything.
I removed the package using remove.packages(rgl)
, and attempted to install from source using R CMD INSTALL rgl_0.95.1409.tar.gz
. That gets stuck on "testing if installed package can be loaded." I had X11 installed, but I downloaded XQuartz 2.7.8 and tried again, with the same result.
?rgl::plot3d
in RStudio does take me to the documentation for the plot3d
function, so I think it installed, just not completely/successfully (rgl::plot3d
as an attempt to call the plot3d
function also results in endless computation).
However, I finally did manage to load rgl
(and use plot3d
) by manually launching the Xapp from the Terminal prior to loading the library in my current R session (just X
in Terminal, xterm
by itself doesn't seem to have the same effect). Can anyone explain why this might be the case, and if there is a workaround to avoid having to manually launch the Xapp? (I do not want to have an application running when I do not need it, but I will also probably sometimes forget to launch the Xapp prior to running this script.)
I'm running OS X Yosemite (10.10.5), RStudio 0.98.1103, R 3.1.3 3.2.2.
The 'rgl' package does not use XQuartz, but rather opens a separate X11 window. Not being able to launch X(11) automatically makes me think that either your system PATH does not have the X11 server in the search path or an environment variable needs to be fixed. I wasn't able to see any differences in the Sys.getenv()
results after loading rgl but I see that I have these in my PATH: /usr/X11/bin:/usr/X11R6/bin1
For a while I was rather confused about this as well. The XQuartz.app appeared very similar to the the X11.app , showing up with the very similar icons, (both appearing in the Taskbar as "X".)