Originally the mt4R.dll tool was created to interface to R from Metatrader. Knowing that this is a windows DLL, therefore mt4R can be accessed from a number of languages, including VB6 and now C#, if a suitable interface is used.
A simple class interface was born in C# that allows .NET users to access R via calls to the mt4R dll. I'm about to embark on a project that will use this newly minted interface in C#.
I've been using this for some time in VB6 but as I'm moving more of my development to C#, and I've decided it was time to share with everyone else. So I put together a simple demo application that shows how to access mt4R.dll in a simple C# Windows form application.
You can download Calling R From CSharp DotNet. (Please follow the instructions on that page) for use in your own projects.
C# / .NET developers don't need to worry about transposing matrices to get them to work in R. R and C# arrays are set up the same way:
Please let me know if you have any comments, questions or problems getting this code to work.