How to suppress R.Net console output?

54 views Asked by At

I have the following code that uses R.Net on Windows:

engine = REngine.GetInstance();
engine.Initialize();
engine.Evaluate("library(tseries)");

Unfortunately it outputs some messages to the console which I want to suppress.

I tried using the NullCharacterDevice in Initialize and the invisible R function but unfortunately they did not suppress the output of the evaluate call.

engine = REngine.GetInstance();
engine.Initialize(null, new NullCharacterDevice());
engine.Evaluate("invisible(library(tseries))");

How can I suppress all console output of R.Net?

0

There are 0 answers