简体   繁体   中英

R rgl package installation warning error

> 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM