R is powerful but it is not good looking (console interface high risk for your eyes :p ). Contrary, Delphi as a Rapid Application Development has a large number of extraordinary GUI library. The point here is.... it s very exciting for us if we can combine the good looking face of Delphi and the powerful of R in order to build our own the statistical application.
Can you imagine if you make a software calculating invers of a matrix with Delphi???? If the dimension of matrix is lower than 3x3 its okey, but it s very terrible if you have a huge matrix dimension.Fortunately, R libraries are open. We can access it with our Delphi. So it s not terrible anymore to built mathematical software with Delphi bcause we only access the R library from delphi, sending value to the R library parameters, gain the R result, and we show it on the beautiful GUI of Delphi...It was successful tricks on my final projects...and helped me gaining then bachelor degree of statistics..hehe).
Lets start!
Second u must have R is installed on you PC. So many R version but here i used R 2.5.1. U can get it here.
Third, u have to installed RSrv250. It is server to make a communication between R and your application. It s also called (D) COM Server. (D)COM Server provides a COM-Interface to R as well as various COM objects and Active X controls for your applications.
Fourth...Restart your girl...ups i mean computer...sorry :D.
Fifth...u need statconnector client and server. These are unit in pascal language available here.
That zip file contain files like this.
Next we must acces STATCONNECTORSRVLib_TLB.pas and STATCONNECTORCLNTLib_TLB.pas to make a connection between R and Delphi.
If you didnt found it, u can contact me at Yahoo!Messenger : mahendra025).
You can register your component with your own name, for example i register as RClient and RServer like the picture below (u must write down your own name at
procedure register below)
Look...i have Delphi VCL like that my Delphi UI like picture below
Here is the screen captured of my sources
I tried making a 3D plot by Delphi using R engine named scatterplot3d. Here is the screen captured of the result
Look! we can get the result of R engine execution on a delphi form. You can make another better GUI then mine depends on your demand.
Full sources code of this sample application can be downloaded at
http://rapidshare.com/files/78415356/R_Delphi_Plot.rar.html
Have a nice statistical soft programming..
mahendra statistika ITS 2002
Coming Soon :
How to Access STATISTICA engine with Delphi......