Problem in calling/getting responce from NLS using VB.NET

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem in calling/getting responce from NLS using VB.NET

Javed Chaudhari
Hi All

Please see the code below.

I am trying to call NLS method in R using VB.NET with the below shown arguments.
I have created a Data using CBIND and then Writing and Reading the CSV File.

When I execute the NLS Call, it gives me the Error "Object is static; operation not allowed (Exception from HRESULT: 0x8004000B (OLE_E_STATIC))" (-2147221493).

V1, V2 , ...V5 are column names in the CSV file generated.

Any help will be really appreciated.

RCon.SetSymbol("Df", Df)
RCon.Evaluate("Df<-cbind(Ri,E0,Emax,ED50,Lamda,Dosage,Epsilon)")
outputDf = RCon.GetSymbol("Df")
listDf.Add(outputDf)

RCon.SetSymbol("DD", DD)
RCon.EvaluateNoReturn("write.table(Df,file=""C:/Javed/data.csv"",append=FALSE,quote=TRUE,sep="","",eol=""\n"",na=""NA"",dec=""."",row.names=TRUE,col.names=NA)")

RCon.Evaluate("DD<-read.table(""C:/Javed/data.csv"",header=T,sep="","")")

RCon.Evaluate("RRR<-nls(V1~V2+((V6^V5)*V3)/((V4^V5)+(V6^V5)),data=DD,start=c(V3=-44,V2=-6,V4=1.5,V5=1.2))")

Thanks

Javed Chaudhari