4

Doing (R3.4, ubuntu 16.04, rgl 0.95.1441):

library(rgl)
    open3d()

returns:

Error in rgl.clear(type, subscene = subscene) : 
  object 'rgl_clear' not found

        x <- sort(rnorm(1000))
        y <- rnorm(1000)
        z <- rnorm(1000) + atan2(x, y)
        plot3d(x, y, z, col = rainbow(1000))

Error in currentSubscene3d() : object 'rgl_getsubsceneid' not found

How to fix this?

3 Answers 3

5

You have probably recently upgraded R. After an upgrade, you need to reinstall packages. An easy way to do so is

update.packages(checkBuilt = TRUE)
2

Oh, kay.

For some reason doing:

apt-get install r-cran-rgl

doesn't install the latest package version for this one. (I am using the external repository maintained by CRAN).

So this has to be solved the old way:

apt-get install libglu1-mesa-dev

and then install rgl from source. Voila.

2

OK, I had the same error message myself, on:

R version 3.4.0 (2017-04-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.2 LTS

My first error message is the same as the OP's, but the second differs:

Error in rgl.clear(type, subscene = subscene) : object 'rgl_clear' not found

Error in rgl.getcolorcount() : object 'rgl_getcolorcount' not found

Just in case this helps anyone else, what fixed this issue for me was:

install.packages("rglwidget")

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.