[R] Method 'EvaluateNoReturn' of object 'IStatConnector' failed

Neil Osborne r_stuff_online at hotmail.com
Sat Jul 19 17:39:37 CEST 2003


Hi All,

I am using the R ActiveX component (v1.2). I have written a custom function 
in R which returns a dataframe. I want to be able to retrieve the contents 
of the returned dataframe in my application.

Here is a snippet of the code (line that throws exception). X has been 
correctly declared and init'ed earlier on in the code.


x.EvaluateNoReturn("results_frame <- MyFunction()")


I was intending to then invoke the GetSymbol method to retrieve the contents 
of results_frame into a local variable.

I notice that this still dosen't work if I try to use the Evaluate method to 
directly assign the returned dataframe to my local variable.


My questions can thus be summarised as ff:
1). How do I call a custom function written in R, using the R ActiveX 
library. ?
2). How do I access a dataframe returned from a function call, using the R 
ActiveX library. ?
3). Can I / How do I pass arguments into a function (including datframes) 
using the R ActiveX library. ?


Many Thanks



PS: I am relatively new to R, and I suspect that my function is not loaded 
into R's memory space. When using R in the normal way (i.e. via GUI), I 
initially used the source() command to load the function script. However, I 
have saved it in the R workspace (default startup directory), and is thus 
loaded everytime R is started. I am assuming the using the R ActiveX library 
fires up R, which loads up the default workspace - but I may be doing 
something wrong.

Any help will be greatly appreciated.

Thanks

_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you.




More information about the R-help mailing list