Calling R from Matlab
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
These are the general instructions I followed to interface Matlab and R: http://www.mathworks.com/matlabcentral/fileexchange/5051
This is the error I get when trying to verify statconnDCOM: Loading StatConnector Server... Done Initializing R...Function call failed Code: -2147221485 Text: installation problem: unable to load connector Releasing StatConnector Server...Done
Otherwise, when I say in Matlab, e.g., openR I get this error: ??? Error using ==> openR at 68 Cannot connect to R. Error: Object returned error code: 0x80040013
I tried every possible advice that I've found online (e.g. made sure that all the installed files are in Matlab path). It looks like my R version is not compatible with the online offered tools, but it seems impossible that no one is using new version of R within Matlab. I am wondering if you can help.
I am using the latest R version and Student version of Matlab.
My goal is to run R functions from Matlab.
%========================================
These are some of the versions (links) that I used: http://rcom.univie.ac.at/download/current/statconnDCOM.latest.exe http://www.mathworks.com/matlabcentral/fileexchange/5051 http://cran.r-project.org/contrib/extra/dcom/ http://cran.r-project.org/bin/windows/base/
I hope this helps someone help me. :)
Thanks!
%===================================================
Duska
1 Kommentar
Shimin
am 31 Jul. 2012
This problem is mostly caused by invalid system path. DCOM tries to find two DLLs in the R_path. They are R.dll and rscproxy.dll. R.dll is located under R's folder when you install it, but you need install and load rscproxy package. Then you will find this dll file typically at C:\Program Files\R\R-2.9.0\library\rscproxy\libs. What you need to do is to add this path to your system path.
Antworten (2)
Cary Opel
am 17 Jun. 2012
After using R(D)COM and Matlab R-link for a while, I do not recommend it. The COM interface has trouble parsing many commands and it is difficult to debug the code. I recommend using a system command from Matlab as described in the R Wiki. This also avoids having to install RAndFriends.
0 Kommentare
Shimin
am 31 Jul. 2012
This problem is mostly caused by invalid system path. DCOM tries to find two DLLs in the R_path. They are R.dll and rscproxy.dll. R.dll is located under R's folder when you install it, but you need install and load rscproxy package. Then you will find this dll file typically at C:\Program Files\R\R-2.9.0\library\rscproxy\libs. What you need to do is to add this path to your system path.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!