[Rd] Handling warning messages

Nikhil Shah n.shah at decisioncraft.com
Fri Aug 12 12:30:34 CEST 2005


Hi,

I have query regarding R & Rserve. In Rserve, there is a way to capture
Errors by RSrvException class, but is there any way to capture warning
messages?

   I have found that there is "warnings()" command in R, which lists the
last warning message, but I am not able to get the warning message in java
program by executing the following line:

REXP rx = null;
rx = connection.eval("x<-sqrt(-9)"); // will generate warning message
connection.eval("warnings()").asString(); // this displays null instead of
warning message

Please reply me correct way, if any, to display warning message.

Regards,
Nikhil Shah



More information about the R-devel mailing list