To display a graph from R to .NET and display it in the WinForms panel:

First, we need to install Statconn, which is the bridge between .NET and R. It is important to install the correct version (it will not work if there is an incorrect combination of x32 and x64). The easiest way to provide this is to install Statconn from the R console:
# Install Statconn bridge.
An error will be Statconn at this point if you do not have the Statconn library Statconn . This is easy to fix:
install.packages('statconn')
This will automatically install the correct version of the StatConn bridge, which is a standalone Windows installer.
Now that we have installed Statconn, we can open a sample .NET project in C:\Program Files (x86)\statconn\DCOM\samples\Graphics.NET . This sample .NET project shows how to use R to build graphics from a C # WinForms project.
ps There is also another code example for Python, C ++, VBS, jscript, etc.
Update
If you can't get this working, try R.Net , which is probably the best choice, because Statconn does not update after a while and is pretty picky with less advanced mixes of '32 -bit '/ '64 -bit' / 'supported version R.
Contango
source share