My system environment:
Mac OS 10.10.2
X11 (XQuartz 2.7.5)
R 3.1.2
When I load and use 'rgl' package, I get following error message.
> library("rgl",lib.loc="/Library/Frameworks/R.framework/Versions/3.1/Resources/library")
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: In fun(libname, pkgname) : error in rgl_init
> plot3d(x,y,z)
Error in rgl.open(useNULL) : rgl.open failed
What's the problem?
I was already using rstudio when I got this warning. This seemed to work for me as suggested on https://cran.r-project.org/web/packages/shinyRGL/README.html.
options(rgl.useNULL=TRUE)
.rs.restartR()
library("plot3Drgl")
HTH ...
rgl appears to be working with RStudio. I'd make sure you have XQuartz installed on your system https://xquartz.macosforge.org/landing/ as X11 is no longer included with OS X by default. Let us know if it's still not working for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With