Open R console in interactive mode

May 17, 2013 at 11:44 AM
Hi

I am new to R and R.Net and am looking for a way to have the R console window open when I create the REngine (to help with debugging purposes).

I am using version 1.5, and it looks like the REngine.Initialise function takes a StartupParameter, but I cannot find anywhere in the help files that says what the possible startup parameters are. I am hoping there is a parameter that will cause the R console window to show.

Thanks
TommyNZ
Developer
May 21, 2013 at 3:02 AM
Hi,

I don't think there is a trivial way to set this up. If what you want is to have an interactive R console, to my knowledge this is not straightforward to set up. R.NET uses the R AP function Rf_initEmbeddedR; to embed R and hand over the Read Evaluate Pring Loop (REPL) I think a call to Rf_ReplDLLinit is needed, to start with.

If what you are seeking is interactivity for temporary debugging purposes, maybe using IronPython + [C#, VB, etc.} + R.NET may help you. It is feasible (been there done that) and should redirect the R console output seamlessely to the IronPython interpreter.

If you seek something where the primary use case is an R user accessing .NET code interactively, I can point you to a related project I have.

Hope this helps.

Cheers