J. Miguel Marin schrieb:
> Hello Thomas,
>
> thank you very much for your quick help, but when I write the code I
obtain NULL's:
>
> R> sl<-comCreateObject("STATCONNECTORSRVLib.StatConnector")
> R> sl NULL
> R> comInvoke(sl,"Init","Scilab")
> NULL
OK ok, I told you, its untested :) This one works for me:
library(rcom)
sl<-comCreateObject("STATCONNECTORSRV.StatConnector")
comInvoke(sl,"Init","SciLab")
x<-1:10
dim(x)<-c(2,5)
comInvoke(sl,"SetSymbol","x",x)
y<-comInvoke(sl,"Evaluate","x'")
comInvoke(sl,"Close")
> I copied the sciproxy.dll file to the scilab bin folder, but I think
this is only oriented to Excel.
No, this is not only oriented to Excel. Just as I told before. Have a
look at
http://www.springerlink.com/content/uv6667814108258m/?p=04d13b6eda8143429cade989d39890f0&pi=5
for some background information on the architecture. rproxy.dll is for
R, sciproxy.dll is for Scilab.
> From Scilab I could not find a way to do something similar to
>
> SciLab> R_handle=actxserver('StatConnectorSrv.StatConnector');
> SciLab> R_handle.Init('R');
>
> But surely this an specific question for SciLab that I must solve
afterwards.
If you can use COM objects in Scilab, you can use both R/Scilab (D)COM
Server or rcom to access R. Of course, this (currently) is Windows only.
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