NEW: rDotNet package

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

NEW: rDotNet package

Jonathan Shore

I’ve published a new package on CRAN called “rDotNet”.   The package allows one to call to .NET based code seamlessly from R, with .NET objects appearing as S4-style object proxies in the R session.   A similar package using this framework was made available for Python as well.   From R one can:

1. Create an instance of any .NET type (whether C#, F#, or otherwise)
2. Call methods on a type
3. Call functions (static methods / functions in modules)
4. Get / Set properties

One interacts with the package as:

require (rDotNet)

## optional initialization (dll location can also be set with an environment var)
.cinit (dll=“~/Dev/MyModels.dll”)

## create object
obj <- .cnew(“com.stg.models.UnivariateHawkes”, 10.0, 1e-2, 1e-3)

## call method “F” on the object
excitation <- obj$F (2.5)

I may add the ability to inline F# or C# code into R files at some point (much in the way Rcpp does), but for now requires that your F# or C# functions be compiled into a .NET assembly.

For more information:

- <>

And the R package is available on CRAN:

- <>

Finally, the package has been tested on OS X (where I do most of my work), Linux, and Windows.   Note that for unix systems “mono” or .NET core must be installed.   See the installation instructions for more information.


        [[alternative HTML version deleted]]

[hidden email] mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.