fslaborg / RProvider

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

Add back FSI printing of R values #228

Closed AndrewIOM closed 2 years ago

AndrewIOM commented 2 years ago

Proposed Changes

The old distribution method had an .fsx file that called in the pretty printer for R into interactive scripts. I have moved this into the RProvider itself and deleted the old RProvider.fsx file that is now redundant.

Note: the solution here doesn't actually work! Need to find a solution for this when using a #r "nuget:RProvider" reference.

Addresses #241

Types of changes

What types of changes does your code introduce to RProvider? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

kMutagene commented 2 years ago

This might not be a satisfactory fix, but in all projects where i provide fsi printers i just add an FSIPrinters module and add instructions to the docs on how to register those via fsi.AddPrinter.

As the function used here is very easy, it still would help to just add a note on the docs about using fsi.AddPrinter(fun (synexpr:RDotNet.SymbolicExpression) -> synexpr.Print())