R Type Provider


IConvertToR<'TInType>

Namespace: RProvider

This inteface can be used for providing new convertors that can convert custom .NET data types to R values. The converter is used whenever the user calls an R function (such as R.foo(...)) with an arguments that is of type TInType.

Instance members

Instance memberDescription
Convert(arg1, arg2)
Signature: (REngine * 'TInType) -> SymbolicExpression
Modifiers: abstract

The method is called when the user calls any of the provided R functions with a value of type 'TInType as an argument.

Example

To use this interface, you need to write a plugin (YourPlugin.Plugin.dll) that exports an implementation of this interface using MEF. The method Convert of the interface is called with the value of 'TInType and should return an R symbolic expression.

1: 
2: 
3: 
4: 
5: 
[<Export(typeof<IConvertToR<IFrame>>)>]
type ConvertMyThingToR() =
  interface IConvertToR<IFrame> with
    member x.Convert(engine, input:MyThing) =
      R.c(1,2,3) // TODO: Convert 'input' to R.
val typeof<'T> : System.Type

Full name: Microsoft.FSharp.Core.Operators.typeof
Multiple items
type ConvertMyThingToR =
  interface obj
  new : unit -> ConvertMyThingToR
  override Convert : engine:'a * input:'b -> 'c

Full name: docs.ConvertMyThingToR

--------------------
new : unit -> ConvertMyThingToR
val x : ConvertMyThingToR
override ConvertMyThingToR.Convert : engine:'a * input:'b -> 'c

Full name: docs.ConvertMyThingToR.Convert
val engine : 'a
val input : 'b
Fork me on GitHub