Save object but file doesn't find

Aug 25, 2013 at 1:42 AM
Edited Aug 25, 2013 at 2:13 AM
basicData <- iris;
index<- sample(2,nrow(basicData),replace=T,prob=c(tranprec,testprec));
dt.train <- basicData[index==1,] ;
dt.test <- basicData[index==2,] ;
myModel <- rpart(Species~.,dt.train,method="class");
save(myModel,file="c:/md/myModel.md");

Those script in the R with no error and i can get the model file !!

When i use the engine.Evaluate(those script) no error ,
but the file does not appear
Developer
Sep 6, 2013 at 3:36 AM
Please provide self-contained sample code reproducing the issue; as it stands some packages and variables are implied and would require second-guessing.
Sep 7, 2013 at 6:49 PM
Edited Sep 7, 2013 at 6:54 PM
Sorry, I lost some script in my question

here are my R script:

__
Those script can work in R
__
library("rpart");
basicData <- iris;
tranprec <-0.7;
testprec <- 0.3;
index<- sample(2,nrow(basicData),replace=T,prob=c(tranprec,testprec)); 
dt.train <- basicData[index==1,] ;
dt.test <- basicData[index==2,] ;
myModel <- rpart(Species~.,dt.train,method="class");
dt.pred <- predict(myModel,dt.test,type="class");
predres <- table(dt.test[,5],dt.pred);

calcTable <- function(tb)
{
     if(is.table(tb))
    {
      index <- length(colnames(tb));
      total <- 0;
      for(i in 1:index)
       {
           for(j in 1:index)
           {            
            total <- total+tb[i,j];
           }
       }
       subtotal <- 0;
       
        for(j in 1:index)
         {            
            subtotal <- subtotal+tb[j,j];
         }
         subtotal/total;
    }
}
save(myModel,file="myModel.md");
fin <- calcTable(predres); 
If i don't use calcTable function ,in R.net it can work

Those Script is a txt file , i just read it and Evaluate it
Coordinator
Sep 8, 2013 at 7:32 AM
It is a bug.
Since R.NET conducts incorrect syntax parsing, some complex syntax would fail to evaluate. I committed a workaround patch (changeset:71eb087eba38) for the issue. I tried your source code with the patch, and I confirmed it worked fine (the code produced myModel.md).

Great thanks

Kosei