Hello, 
I shall appreciate any help on the problem as mentioned below. I am using Ada 
package, which has a predict function that works like predict.rpart. When I run 
a piece of code (e.g. pred <- predict(gdis, train[,-1], type = "prob") ) in R, 
and type "pred" at the R prompt, I get the probability table  such as the one 
given below           [,1]      [,2][1,] 0.2011456 0.7988544[2,] 0.2011456 
0.7988544[3,] 0.2011456 0.7988544[4,] 0.2011456 0.7988544[5,] 0.2011456 
0.7988544However, when I try to do the same thing (code given below) from Excel 
through Rinterface, I am getting "#Rerror". Call Rinterface.RRun("pred <- 
predict(gdis, train[,-1], type = 'prob')")Call RInterface.GetArray("pred", 
Range("C20", "C24")) I went through the mailing list archive and tried the 
following alternatives: 1.  Call Rinterface.GetArray("pred[,1]", Range("C20", 
"C24"))(Results in #Rerror) 2.  Dim cmdString As String cmdString = 
"predict(gdis, train[,-1], type = 'prob')" Call 
Rinterface.RRun("myOutput<-capture.output(print(try({" & cmdString & "}, 
silent=TRUE)))") (Geting the following output[1] "Error in predict.rpart(f, 
newdata = dat, type = \"prob\") : \n\tobject \"train\" not 
found\n"attr(,"class")[1] "try-error" ) 3. Call 
Rinterface.GetArray("as.matrix(pred)", Range("C20", "C24"))(Results in 
#Rerror)The Ada manual says that the return value of the predict is a matrix of 
probability values. I tried even the following, which too resulted in "#Rerror" 
4. Call Rinterface.GetArray("pred[1,1]", Range("C20", "C24"))  Looking forward 
to any useful hint, Sincerely,Sakib 
_________________________________________________________________
Download the latest version of Windows Live Messenger NOW!
http://get.live.com/en-ie/messenger/overview
_______________________________________________
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

Reply via email to