XQuartz and Rstudio output plots within the cluster

Hello! I’m new to using the cluster and just tried running RStudio through an OOD Remote Desktop instance to get a sense for how it works. I will ultimately need to use the cluster to run a long Rmd script that outputs thousands of PNG files to the working directory. However, when I try running any function that outputs a PNG or TIFF file, I get the following Warning and Error messages:

Warning: failed to load cairo DLL
Error in dev.control(displaylist = “enable”) :
dev.control() called without an open graphics device

I already ran Options(bitmapType=‘cairo’) earlier on in my Rmd file but it didn’t solve this problem. I’ve done some googling and it seems like this might be an XQuartz compatibility/requirement issue? I have XQuartz downloaded on my MacBook when I run the script locally, as it’s required for me to output the plots I’m making.

How can I resolve this issue? Is there any way to download XQuartz from within the Cluster?

Thank you in advance for your help with this topic!

Best,
Caleb (PhD student, EPS Department)

It may be helpful for you to post a small test code segment that demonstrates the problem. I’m assuming what is happening is whatever package you are using for the graphics wants to display on a screen and not write a file. With a code segment, someone here may be better able to assist you with how to best do that.

1 Like