This project is read-only.

Raw output from R

Mar 4, 2015 at 12:03 AM
Edited Mar 4, 2015 at 12:03 AM

I am currently trying to return the output from R exactly the way R would show in its console.

I am open to any method that works.

I tried using GenericVectors and iterating through it but the output was not organized very well for some of the outputs.

I would prefer to use something like sink() but the text file is empty.
I currently changed the code to something very simple to help ensure there is no error in the R code.

I tried to run it directly from C#:
And I have tried to put the code in a file
but the results are the same.
I get the Histogram graph which displays fine.
And the text file gets created and the date modified gets updated.
but the text file itself is empty inside.

Any suggestions would be very helpful.

Mar 8, 2015 at 11:04 PM
Edited Mar 8, 2015 at 11:04 PM
Try ThisAddIn.engine.AutoPrint = true before evaluating any R code. Manually needing to enable AutoPrint is a 'by design' bevhavior of the REngine. You can find out more in the R team's R-Internals document, Chapter 1.6:

Blue Skies,
Mar 9, 2015 at 11:55 PM
It works!

I spent a lot of time trying to get this to work.
Thanks a bunch!
Mar 10, 2015 at 11:09 PM
Happy to help. Come back if you run into anymore issues.