Potrzebuję interfejs R do niektórych aplikacji C#. Zainstalowałem rscproxy_1.3
i R_Scilab_DCOM3.0-1B5
dodane odniesienia COM do STATCONNECTORCLNTLib
, StatConnectorCommonLib
i STATCONNECTORSRVLib
, ale nadal nie mogę go uruchomić.Interfejs C# - R
Kiedy uruchomić następujący program testowy:
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");
}
}
}
otrzymuję ten wyjątek:
Unhandled Exception: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80040013
at STATCONNECTORSRVLib.StatConnectorClass.Init(String bstrConnectorName)
Z góry dzięki.
AKTUALIZACJA: OK, wciąż nie ma szczęścia. Postaram się wyjaśnić, co zrobiłem do tej pory.
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
Z Scilab to podstawowy test. Starałem się go uruchomić, ale mam następujący błąd:
Loading StatConnector Server... Done Initializing R...Function call failed Code: -2147221485 Text: installation problem: unable to load connector Releasing StatConnector Server...Done
niż Spojrzałem w zmiennych PATH/system i nie znalazł ścieżka/R_HOME/R_USER info. Ponadto nie mogłem znaleźć w rejestrze niczego związanego z R.
Podejrzewam, że robię coś bardzo złego, więc bardzo potrzebuję pomocy od was.
Zobacz http://stackoverflow.com/questions/12834704/exception-from-hresult-0x80040013-when-intregating-r-with-c – Contango