[R] help - "Object is static, operation not allowed" Error

WeiQiang.Li@seagate.com WeiQiang.Li at seagate.com
Fri Sep 12 03:19:06 CEST 2003


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




More information about the R-help mailing list