Tuesday, 27 January 2015

rClr 0.7-3 released

Version 0.7-3 of rClr (source code also on GitHub), a package to access arbitrary .NET code seamlessly in-process, has just been released. The package was first introduced a year and a half ago in another blog post, and you can skim through that prior post to get an overview of the capabilities. This post will summarise newer features.

A lot has happened technologically to enable this release. The library R.NET has evolved and been through several rounds of fixes, runtime performance improvements, and refactoring. It is now the prefered subsystem in rClr to handle data conversion, and is active by default.

An overview of the improvements since the release series 0.5.x is:
  • Running unit tests on a Linux/Mono stack is at feature parity with Windows/Microsoft.NET. A few edge cases with date and time at daylight savings transitions are the only known limitation.
  • The conversion of data between R and .NET is increasingly handled via C# code rather than C++. While transparent to an R user, this is important because the same code can run on Mono and MS.NET, where C++ code is trickier and usually will vary between these two runtimes. Further data conversion features will be much, much easier to implement in C#.
  • Complex numbers are supported
  • Matrix conversions
  • It is possible to transparently .NET dictionaries into R named lists
  • Many difficulties with the discovery/loading of the native R shared libraries have been alleviated.


Some developments are reshaping the landscape of the .NET world. Most of the .NET stack is now being genuinely open sourced. Closer to the R community is the recent announcement of Revolution Analytics joining Microsoft. It is likely that a more open sourced .NET stack will greatly facilitate new features for rClr. I have no insight as to Revolution Analytics, but hope rClr has a role to play and will seek collaboration or advice.

Aside from this changing broader context, some things to tackle are:
  • Documentation, documentation, documentation...
  • Facilities to more easily convert data between .NET DataTable and R data frames
  • Supporting Generic .NET classes
  • Wrapping .NET classes and interfaces with R Reference Classes. This feature has been explored and is already quite functional on a branch, with automatic R reference class code generation, but the R code for reference classes can lead to unacceptably long runtimes even with not so complicated complicated inheritance trees.
  • Submission to CRAN?

Related work

A few packages using rClr are publicly accessible, and may be of interest if you want to build your own package with dependencies on rClr.


jhansi joe said...

Excellent post!!! The future of .net application development is on positive note. It offers huge career prospects for talented professionals all over the world. Training on .net technology will ensure good salary package. Best DOT NET Training in Chennai | .NET Course in Chennai

Paul Miller said...

Amazing post :-) Keep sharing

web designing course in chennai|web designing training

Nandhini said...

Interesting post! This is really helpful for me. I like it! Thanks for sharing!
Mobile application developers in Chennai | PHP developers Chennai

Simon Woodward said...

Is rClr still alive? I'm really struggling to install it. I have R3.4.4 (unsupported?) and I installed Mono (but compiler doesn't seem able to find it). I'm on Windows 10. I have VS2017 CE installed with MVC++ 2017 and C# Tools. Do I need MikTex too? Maybe there is a newer and better way to call C# from R? Thanks.

Simon Woodward said...

I'll post details on https://github.com/jmp75/rClr/issues/35.

Post a Comment