NEW: rDotNet package

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

NEW: rDotNet package

Jonathan Shore
Hi,

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:

- https://github.com/tr8dr/.Net-Bridge <https://github.com/tr8dr/.Net-Bridge>

And the R package is available on CRAN:

- https://cran.r-project.org/package=rDotNet <https://cran.r-project.org/package=rDotNet>

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.

regards
Jonathan



 
        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- 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.