From j.nybeck at gmail.com  Wed Apr 25 15:50:38 2012
From: j.nybeck at gmail.com (Joel)
Date: Wed, 25 Apr 2012 13:50:38 +0000
Subject: [Rd] Use of R in C#
References: <C3D16A4C8BD3F843860C73573C70DD952E255192@TK5EX14MBXC103.redmond.corp.microsoft.com>
Message-ID: <loom.20120425T154547-376@post.gmane.org>

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:
> 
> STATCONNECTORCLNTLib;
> StatConnectorCommonLib;
> STATCONNECTORSRVLib;
> 
> 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
failure.
> 
> 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.



[Rd] Use of R in C#
Joel