WeiQiang.Li@seagate.com
2003-Sep-12 01:19 UTC
[R] help - "Object is static, operation not allowed" Error
Hello,
I am a newbie in R project and trying to call prcomp(x) of R function
using (D)COM server communicate with R in ASP, and encountering the error
"Runtime error -2147221493(8004000b). Automation Error, Object is static,
operation not allowed." at line
Result=StatConn.Evaluate("y<-prcomp(x)"). E
ven I have added the line StatConn.EvaluateNoReturn("library (mva)"),
it
still does not help me after I saw Wijk, H.J. van der's post mentioned that
have to load library
My environment is shown as below:
OS: Win2000 Server
R version: 1.7.1
DCOM version: 1.2
Source code is shown as below:
<%
Set
StatConn=Server.CreateObject("StatConnectorSrv.StatConnector")
StatConn.Init ("R")
StatConn.EvaluateNoReturn("x<-matrix(c(1,2,3,4,5,6,7,8,9),3)")
StatConn.EvaluateNoReturn("library (mva)")
Result=StatConn.Evaluate("y<-prcomp(x)")
StatConn.Close
%>
I have another problem when displaying dimension variable
"Result(1,1)" on client, there will be a "Type mismatch:
'Result'" error.
Source code is shown as below:
<%
Set
StatConn=Server.CreateObject("StatConnectorSrv.StatConnector")
StatConn.Init ("R")
Result=StatConn.Evaluate("x<-matrix(c(1,2,3,4,5,6,7,8,9),3)")
Response.write Result(1,1)
StatConn.Close
%>
You are very appreciated if you help me on above issue.
Thanks Again!
Regards,
WeiQiang Li
Dirk Eddelbuettel
2003-Sep-12 02:14 UTC
[R] help - "Object is static, operation not allowed" Error
On Fri, Sep 12, 2003 at 09:19:06AM +0800, WeiQiang.Li at seagate.com wrote:> I am a newbie in R project and trying to call prcomp(x) of R function > using (D)COM server communicate with R in ASP, and encountering the errorAs a general rule, I found it helpful to disentangle matters: i) make sure you really do have working R code, e.g. by actually running that code in the Gui ii) make sure you really do talk back and forth between your controlling app and R; so send some data over the wire, alter it and see if you it back --- also make sure that you cover the data type you intend to send in i) Hope this helps, Dirk -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx