J. Miguel Marin schrieb:

I hoped before, that something like

sl<-comCreateObject("matlab.Application")

should work with SciLab (e.g. "SciLab.Application")

But as R> sl<-comCreateObject("STATCONNECTORSRV.StatConnector")
sl
<pointer: 0x0006fe34>
attr(,"class")
[1] "COMObject"
R> comInvoke(sl,"Init","SciLab")
NULL
R> x<-1:10
R> dim(x)<-c(2,5)
R> comInvoke(sl,"SetSymbol","x",x)
NULL
R> y<-comInvoke(sl,"Evaluate","x'")
R> y
NULL

I cannot understand why matlab is identified but the parameter "SciLab" is not, even when the Scilab's console is under execution.

I wonder whether this is related with the Registry of Windows, or the current version of SciLab (I use the latest version 5.01, just linked yesterday), or I have any problem with rcom, because I usually call R from MatLab with D(COM), but I have not tried in the opposite direction: matlab from R. Although, with comCreateObject("matlab.Application") the matlab console is openned so I assumed rcom worked fine.

My main intention was to substitute propietary code, like MatLab, by free programs like SciLab or Octave, but perhaps things are not so easy.

Anyway, thank you for your kind responses.


Hello,
excuse for my insistence. I have only a little experience in MatLab, so
I am not an expert.

If I write sl<-comCreateObject("STATCONNECTORSRV.StatConnector")

it works

but comInvoke renders "NULL"
In my example, I can see comInvoke to be called 4 times.

Only the one I'm assigning to y should return a result.


As a simple question,  method="Scilab" is refered to the main *.exe
file from SciLab? Or another "thing"?

Which is the method "Scilab"?


I am afraid I do not understand the logic behind comInvoke, because I
do not know where rcom must find the method SciLab.

Aaaah, I see. You mean comInvoke(sl,"Init","SciLab")

First of all, this should tell us how important reasonable quoting is.

Second, this calls the method "Init" on the object "sl" and passes the parameter "SciLab".


Sorry for my lack of experience.

Best

ACTXSERVER Creates a COM Automation server

In SciLab? If yes, you should be able to easily access R from Scilab.

Thomas
_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at





jm~

_______________________________

       J. Miguel Marin

http://www.est.uc3m.es/jmmarin

   Dep. of Statistics
University Carlos III of Madrid
       Spain (E.U.)
_______________________________





_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to