[Rcpp-devel] how to get rid of the warning message: no graphics system to unregister

Darren Cook darren at dcook.org
Sun Feb 12 03:34:41 CET 2012


> I am calling a R function through Rcpp and RInside in my c++ program
> in Linux. There are a lot of warning messages saying "no graphics
> system to unregister" ...Is there anyone who knows the reason and how
> to avoid the printing of such warning messages? 

Generally, once you track down the line causing the problem,
suppressWarnings() (an R function) might help. Or
suppressPackageStartupMessages() or suppressMessages() may help.

For the cause, are you running on a machine with no GUI or X server?

However, a google suggests this is a message related to shutting down R,
and implies your script has corrupted something. There appears to be no
fix as they, like Dirk, insisted on a reproducible example.

I'm wondering why you would be starting up and shutting down R so many
times in your script. Do you create one RInside instance, either as a
global, or in main() and then pass it around by reference? Or are you
create RInside instances inside other functions, or inside loop bodies?
If the latter, can you refactor to do the former so you only have one
instance?

HTH,
Darren


--
Darren Cook, Software Researcher/Developer

http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)


More information about the Rcpp-devel mailing list