[R] R.matlab package help
Henrik Bengtsson
hb at stat.berkeley.edu
Fri Aug 27 17:33:31 CEST 2010
Hi,
what is the version of Matlab you are running?
Could you show a minimum verbatim example - starting with a fresh R
session and library("R.matlab") - that gives you the error?
Have you tried the example of help(Matlab)? Then, for troubleshooting
it could be useful to ask Matlab to display values, e.g. eval(matlab,
"A"); That will show you the value as in Matlab before being transfer
to R.
In that example, it is also suggested to do setVerbose(matlab, -2);
That'll give you more details on what is done under the hood.
To make sure I understand you correctly, you are trying to do this
where Matlab is started on the same machine, correct?
BTW, have you had any success running R.matlab before or is this your first try?
Cheers,
/Henrik
On Fri, Aug 27, 2010 at 6:58 AM, michael <tufemichael at gmail.com> wrote:
> I updated R and still have the problem.
> When I set
> remote = true, it reports:
>
> ??? Undefined variable "java" or class "java.io.InputStreamByteWrapper".
>
> Error in ==> MatlabServer at 262
> reader = java.io.InputStreamByteWrapper(4096);
>
> and I changed remote = false, same problem pops up:
>
> ??? Error: A MATLAB string constant is not terminated properly.
>
> Error in ==> MatlabServer at 197
> eval(expr);
>
>
> Thanks,
>
> Michael
>
> On Fri, Aug 27, 2010 at 9:02 AM, michael <tufemichael at gmail.com> wrote:
>> David,
>>
>> Thanks for your reply, I compile it under the old version of
>> R, I'll update R and run it again.
>>
>> Michael
>>
>> On Fri, Aug 27, 2010 at 7:59 AM, michael <tufemichael at gmail.com> wrote:
>>> Hi,all
>>> I have a problem running R.matlab package
>>> (under 2.10.1 version). I can set up the matlab server under local
>>> machine(run the MatlabServer.m), "
>>>
>>>
>>> And I can use setVariable and evaluate matlab functions in R. But when I ask
>>> Matlab to send the value back to R using getVariable function it
>>> always returns an error:
>>> "
>>> ??? Error: A MATLAB string constant is not terminated properly.
>>>
>>> Error in ==> MatlabServer at 197
>>> eval(expr);
>>> "
>>>
>>> it seems matlab have put the data into a temporary file, so my remote
>>> option is actually FALSE? (how to set it to be true?), or otherwise
>>> what could be the possible problem since I can send data to matlab
>>> from R but not vice versa.
>>>
>>>
>>>
>>>> sessionInfo()
>>> R version 2.10.1 (2009-12-14)
>>> i386-pc-mingw32
>>>
>>> locale:
>>> [1] LC_COLLATE=English_United States.1252
>>> [2] LC_CTYPE=English_United States.1252
>>> [3] LC_MONETARY=English_United States.1252
>>> [4] LC_NUMERIC=C
>>> [5] LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>>
>>> other attached packages:
>>> [1] R.utils_1.5.0 R.matlab_1.3.1 R.oo_1.7.3 R.methodsS3_1.2.0
>>>
>>>
>>>> traceback()
>>> 5: file(con, open = "rb")
>>> 4: readMat.default(filename)
>>> 3: readMat(filename)
>>> 2: getVariable.Matlab(matlab, "B")
>>> 1: getVariable(matlab, "B")
>>>
>>> Thanks,
>>>
>>> Michael
>>>
>>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list