Question Integrate R libraries

zhouy

New member
Joined
Mar 5, 2012
Messages
2
Programming Experience
Beginner
Dear All,

I want to integrate some R functions for matrix into VB.Net application.

This is my matrix – to solve C,D,E
matrix.jpg
These are R codes (working properly)

> e<- matrix(nrow=3, ncol=3, data=c(5,0,10,0,10,10,10,0,34))
> f<- c(1,0,0)
> solve(e,f)
[1] 0.4857143 0.0000000 -0.1428571
>

So I want to solve this in VB.NET application using integrated R codes via R(D)COM server. I have downloaded and installed “Visual Studio 2010”, “R 2.7.1 win32” and “R_Scilab_DCOM3.0-1B5”. But I don’t know how to start this.

Anyone can help me?
Thanks!
 
When you say:
using integrated R codes
what exactly do you mean? Does that mean writing R code in your VB source or entering R code into a control at run time or something else?

From the name, I'm assuming that you have a COM DLL. If so then you can reference it in your project just like a .NET assembly. You can then use the types and members in that library in pretty much the same way as you would use .NET types and members.
 
Thanks jmcilhinney,

Actually I want to solve the matrix and get C, D and E (C=0.4857143, D=0.0000000 and E=-0.1428571). If it is possible in VB.NET programing, no need to call R functions. But my knowledge is poor to solve this in VB.NET. But in R its very easy. Anyone can show me how to write this in VB.NET itself or how to call R functions in VB.NET to solve this? I mean can anyone give me sample codes for this?
Thanks!
 
Last edited:
Back
Top