RStudio.cloud & rglplot

I apologize if this has been covered elsewhere, I'm new to the Community and wasn't able to find anything doing a cursory search. I've been using RStudio.cloud since I am unable to install the RStudio on my work computer, and have run into an issue with the 'rgl' package. I'm working on a lab for a course and do not seem to be able to get the package to produce any results - with the rglplot function. Here is the message:

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE

Is there a workaround for RStudio.cloud for this issue?

Thanks,

Unfortunately it appears that rgl requires a display attached to the server on which it is running. As rstudio.cloud runs in the cloud on remote servers, there are no displays. However, the rgl documentation says this:

rgl.useNULL for a description of how to use rgl on a system with no graphics support.

and

This function is checked by the initialization code when rgl is loaded. Thus if you want to run rgl
on a system where there is no graphics support, you should run options(rgl.useNULL = TRUE) or
set the environment variable RGL_USE_NULL=TRUE before calling library(rgl) (or other code
that loads rgl), and it will not fail in its attempt at initialization.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.