[R] Need your help-SOS
Thomas W Blackwell
tblackw at umich.edu
Wed Sep 10 14:52:10 CEST 2003
WeiQiang -
As I read it, both difficulties arise on the DCOM side,
not in the R syntax. Problem 1, and I'm just guessing,
could arise if you are not allowed to overwrite the
value of "Result" in the DCOM environment. Try again,
using two different variable names in the two successive
lines.
Problem 2 would seem to have something to do with the
DCOM syntax for subscripting an array. Inside R, the
syntax would be to use square brackets for subscripting x,
thus, x[1,1] would return the upper left corner element.
I have no knowledge of DCOM, so I don't know how the
command Response.write Result(1,1) gets interpreted.
- tom blackwell - u michigan medical school - ann arbor -
On Wed, 10 Sep 2003 WeiQiang.Li at seagate.com wrote:
> 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."
>
> 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)")
> 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
> IT-Factory Information Systems
> Tel: 6485-2439
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
More information about the R-help
mailing list