Search code examples
javarjri

Sending R-Errors (from the console) into the Java standard output, when using JRI


Inside my Java code I'm using the eval method (JRI) to run R commands within Java (I'm not interested in reading .R files through source command , due to distribution considerations).

I'm trying to debug my R code within Java.

Although i ran into an interesting solution in Reading R-Errors through JRI , which uses the sink function in R, I'm looking for a way to import the R console output straight into my Java output (it seems more comfortable).

Has anyone of you ever managed to import R console output straight into the Java output?


Solution

  • User @Daniel https://stackoverflow.com/users/1107657/daniel

    Gave a great answer to this in :

    Get same output as R console in Java using JRI