> library(rgl)
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: In fun(libname, pkgname) : error in rgl_init
I also tried plot3d functions and I got the error:
Error in rgl.open(useNULL) : rgl.open failed
How to resolve it?
Your previous questions indicate that you're on Ubuntu: rgl depends on some gl packages to function.
What you may not know: you can install r-cran-rgl as a package
$ sudo apt-get install r-cran-rgl
That will install all necessary dependencies and allow you to just load the package in R. It would probably be helpful to run remove.packages("rgl") from R first so that you have the correct version.
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