Closed ucb closed 7 years ago
Your R call uses the string:
"tr = treikon('IDN','e:\\Program Files (x86)\\Thomson Reuters\\Eikon\\X\\Bin');"
which according to the error message MATLAB sees as:
tr = treikon('IDN','e:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin');'
When you say it works when you cut'n'paste it in manually at the MATLAB prompt, did you really try that latter one with single backslashes? Backslashes are used to escape things, so you really want MATLAB to see e:\\Program ...
and not e:\Program ...
.
To achieve this, you need to use \\\\
on the R end for every \\
you want on the MATLAB end. Alternatively, which is much easier, is to use forward slashes, i.e. 'e:/Program Files (x86)/Thomson Reuters/Eikon/X/Bin'
- that should work as is.
I'll be closing - feel free to re-open if needed.
I am trying to do the following
evaluate(matlab,"tr = treikon('IDN','e:\\Program Files (x86)\\Thomson Reuters\\Eikon\\X\\Bin');")
The error I am getting is
`Exception:
MatlabException: Failed to evaluate expression 'tr = treikon('IDN','e:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin');'.
at #04. readResult.Matlab(this)
readResult.Matlab() is in environment 'R.matlab'
at #03. readResult(this)
readResult() is in environment 'R.matlab'
at #02. evaluate.Matlab(matlab, "tr = treikon('IDN','e:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin');")
evaluate.Matlab() is in environment 'R.matlab'
at #01. evaluate(matlab, "tr = treikon('IDN','e:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin');")
Error: MatlabException: Failed to evaluate expression 'tr = treikon('IDN','e:\Program Files (x86)\Thomson Reuters\Eikon\X\Bin');'.`
Executing the same from Matlab window generates no error. Here's the Matlab installation I am using for testing: `MATLAB Version: 8.6.0.267246 (R2015b) MATLAB License Number: 40537114 Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1) Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) Client VM mixed mode
MATLAB Version 8.6 (R2015b) Data Acquisition Toolbox Version 3.8 (R2015b) Database Toolbox Version 6.0 (R2015b) Datafeed Toolbox Version 5.2 (R2015b) Econometrics Toolbox Version 3.3 (R2015b) Financial Instruments Toolbox Version 2.2 (R2015b) Financial Toolbox Version 5.6 (R2015b) Global Optimization Toolbox Version 3.3.2 (R2015b) Image Processing Toolbox Version 9.3 (R2015b) MATLAB Coder Version 3.0 (R2015b) MATLAB Compiler Version 6.1 (R2015b) MATLAB Compiler SDK Version 6.1 (R2015b) Optimization Toolbox Version 7.3 (R2015b) Spreadsheet Link EX Version 3.2.4 (R2015b) Statistics and Machine Learning Toolbox Version 10.1 (R2015b) Symbolic Math Toolbox Version 6.3 (R2015b)`
Other simple commands, such as
res <- evaluate(matlab, "C=1+2;")
execute with no issues.NB: Sorry for strange formatting, I cannot find the symbol triggering it.