Hi Alex, author here - thanks for this. Indeed, there is a typo in MatlabServer.m that gives the error iff the port number is out of range. So if you set MATLABSERVER_PORT in range it should work. However, the Matlab code contains a syntax error in that statement which shouldn't be there. FYI, it should read (single quote twice):
error('Cannot not open connection. Port (''MATLABSERVER_PORT'') is out of range [1023,49151]: %d', port); I've updated the package accordingly. You can install the updated version by: source("http://www.braju.com/R/hbLite.R") hbLite("R.matlab") Best, Henrik On 5/8/06, Alexander Nervedi <[EMAIL PROTECTED]> wrote: > Hi > > I have some code up and runnning in Matlab and need it for some stuff better > handled in R. So R.matlab sounded terrific. However, I am having trouble > getting it to go. > I am using R v 2.2.1 (i know i know i need to upgrade), and Windows XP and > Matlab 6.0.0.88 (R12). > > here is what I get. > # in R GUI > >library(R.matlab) > Loading required package: R.oo > R.oo v1.1.6 (2006-04-03) successfully loaded. See ?R.oo for help. > R.matlab v1.1.1 (2006-01-21) successfully loaded. See ?R.matlab for help. > >Matlab$startServer() > Loading required package: R.utils > R.utils v0.7.7 (2006-03-30) successfully loaded. See ?R.utils for help. > [1] 0 > > # > > However, Matlab does open up on seperate window, but with an error message. > This reads, > > To get started, type one of these: helpwin, helpdesk, or demo. > For product information, visit www.mathworks.com. > > ??? Error: File: C:\R\R-2.2.1\MatlabServer.m Line: 109 Column: 45 > ")" expected, "identifier" found. > > > > So I went to MatlabServer.m and found that > > 108 if (port < 1023 | port > 49151) > 109 error('Cannot not open connection. Port ('MATLABSERVER_PORT') is out of > range [1023,49151]: %d', port); > 110 end > > (the numbers are the line numbers). my guess is that I haven't been able to > connect and the 0 i see from within R is a sign of this. Can anyone advice > me as to what is going on. I feel there is something missing - i can get the > matlab command window to come up but .... the connection i guess is not > there. > > Any ideas would be really helpful. > > Alex. > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html