fslaborg / RProvider

Access R packages from F#
http://fslab.org/RProvider/
Other
235 stars 69 forks source link

Suppress printing of R values #156

Closed pfgherardini closed 8 years ago

pfgherardini commented 8 years ago

Hi,

First thanks a lot for your work on this.

I am using the R provider from a compiled F# program (i.e. non-interactive). After each R function call the provider prints the output (it looks like the R print function is implicitly called each time). Is it possible to suppress this behavior?

Thanks

jmp75 commented 8 years ago

This is probably because of the default behavior of R.NET. You can get the instance of the R engine via RDotNet.REngine.GetInstance(), and set its AutoPrint property to false. This is set to true by default to mimick the behavior of R with graphics; there were many questions as to "why does my R graphic not pop up when I call R with R.NET".

Not sure whether my reply applies in the case were you are using FSharpProvider.Server, however.

pfgherardini commented 8 years ago

Thank you very much for the quick reply, that did the trick!