[Rd] Use of R in C#

Joel j.nybeck at gmail.com
Wed Apr 25 15:50:38 CEST 2012

Jeff Abrams <jeffab <at> microsoft.com> writes:

> I have a C# program that requires the run of a logistic regression.  I have
downloaded the R 2.11 package, and
> have added the following references to my code:
> StatConnectorCommonLib;
> In my code I have:
> StatConnector scs = new STATCONNECTORSRVLib.StatConnectorClass();
> scs.Init("R");
> The init step returns the below error which seems to indicate a connection
> System.Runtime.InteropServices.COMException was unhandled
>   Message="Exception from HRESULT: 0x80040013"
>   Source="Interop.STATCONNECTORSRVLib"
>   ErrorCode=-2147221485
> Any ideas?
> Jeff Abrams
> Research Engineer
> Auction Analytics, Microsoft
> 	[[alternative HTML version deleted]]

For those who say this is not an R issue, it is... I believe this is a issue
with the R registration within Windows. I have all the requisite .dll's in the R
install file, and have the R_USER and R_HOME environment variables, yet I am
still seeing this issue. I can use other .dll's in this way, so this is NOT a
COM issue. It is an R problem. Any thoughts would be helpful.

More information about the R-devel mailing list