RをいくつかのC#アプリケーションにインターフェイスする必要があります。私はrscproxy_1.3
とR_Scilab_DCOM3.0-1B5
をインストールしました。STATCONNECTORCLNTLib
、StatConnectorCommonLib
、STATCONNECTORSRVLib
へのCOM参照が追加されましたが、まだ動作しません。C# - Rインターフェイス
私は、次のテストプログラムを実行すると:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//COM references
using STATCONNECTORCLNTLib;
using StatConnectorCommonLib;
using STATCONNECTORSRVLib;
namespace R_TESTING
{
class Program
{
static void Main(string[] args)
{
StatConnector sc1 = new STATCONNECTORSRVLib.StatConnectorClass();
sc1.Init("R");
}
}
}
を、私はこの例外を取得:事前に
Unhandled Exception: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040013
at STATCONNECTORSRVLib.StatConnectorClass.Init(String bstrConnectorName)
感謝を。
更新日: いいえ、まだ運がありません。 私がこれまでにしたことを説明しようとします。
Installed R-2.12.2-win.exe from rproject to the
C:\Program Files\R\R-2.12.2
Downloaded rscproxy_1.3-1.zip and copy/pasted it to the
C:\Program Files\R\R-2.12.2\library
Installed R_Scilab_DCOM3.0-1B5.exe to the
C:\Program Files (x86)\R\(D)COM Server
Scilabでは基本的なテストが行われます。私はそれを実行しようとしたが、私はエラー以下だ:
Loading StatConnector Server... Done Initializing R...Function call failed Code: -2147221485 Text: installation problem: unable to load connector Releasing StatConnector Server...Done
私はPATH /システム変数に見て、何のパス/ R_HOME/R_USER情報を見つけていないたより。また、レジストリにR関連のものが見つかりませんでした。
私は何かひどく間違っていると思います。だから、皆さんの助けが切望されています。 hereから
http://stackoverflow.com/questions/12834704/exception-from-hresult-0x80040013-when-intregating-r-with-c – Contango