If you've been looking for a way to call R from your C# and .NET code, this sample project will show you how to interface to the mt4r.dll to access the R terminal. The cMT4R interface is an easy way to gain access to the R statistical computing environment from C# and .NET.
A bit of history: MT4R is a project that allows access to R through a Windows DLL interface that interfaces with the R terminal. The interface was originally written for access from Metatrader to R. However, I quickly realized that mt4R.dll could also be a useful tool to link other programming environments such as C# .NET to R, as well as VB6 to R. I created a simple class that translates and adapts the Metatrader interface found in mt4R.mqh so that C# and DotNet users may access the mt4R dll and thus access the power of the R statistical computing environment from C# / .NET.
If you have any questions, comments or suggestions for cMT4R, please post a comment. Enjoy!
Attached is a zipped project folder containing TestMT4R, which shows how to use cMT4R. You may freely add cMT4R to your C# and .NET projects.