Oh god, I remember that it was a huge pain in the ass. Let's see if I remember ... And before I start, I warn you that I just “got this job” and never cared about it if I could remove parts from the process.
Downloading is done from http://rcom.univie.ac.at/download.html . If I remember correctly, the RandFriends package is all you need, it installs crapload (just install it all), but is simple. Alternatively, I think that if you install the “rscproxy” package in R, you can simply download “statconnDCOM” and install it. The memory is foggy, but I know that one of these methods leads to an annoying splash screen every time you run your C # executable, and the other does not. Although, perhaps this was some setting with which I played.
Now I can’t remember how you verify that the material has been successfully installed. Although, of course, these are examples. Once this starts, open your C # project. Indicate the following projects,
StatConnectorCommonLib STATCONNECTORSRVLib
In your code, you probably want to implement IStatConnectorCharacterDevice in order to get the R output returning to C #. Your initialization code will look something like this:
private StatConnector _StatConn; private IStatConnectorCharacterDevice _CharDevice; private Whatever() {
Then you should just use functions as needed
_StatConn.EvaluateNoReturn("x <- 3"); var returnObj = _StatConn.Evalute("1 + 1");
Hope this helps.
tl; dr download RAndFriends, do a new installation using
mike
source share