Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Edited Unassigned: RDotNet ParseException on IIS [49]

$
0
0
```
public static double TestOtherR()
{
engine = REngine.GetInstanceFromID("RDotNet");
if (engine == null)
{
var envPath = Environment.GetEnvironmentVariable("PATH");
var rBinPath = @"C:\Program Files\R\R-3.0.1\bin\i386";
Environment.SetEnvironmentVariable("PATH", envPath + Path.PathSeparator + rBinPath);
engine = REngine.CreateInstance("RDotNet");
engine.Initialize();
}
// .NET Framework array to R vector.
NumericVector group1 = engine.CreateNumericVector(new double[] { 30.02, 29.99, 30.11, 29.97, 30.01, 29.99 });
engine.SetSymbol("group1", group1);
// Direct parsing from R script.
NumericVector group2 = engine.Evaluate("group2 <- c(29.89, 29.93, 29.72, 29.98, 30.02, 29.98)").AsNumeric();
//return group2.Last();
GenericVector testResult = engine.Evaluate("t.test(group1, group2)").AsList();
double p = testResult["p.value"].AsNumeric().First();
return 1.0;
}
```
that's my test code,it runs perfectly on my web server debugger,but on iis, it throws ParseException on the line
```
GenericVector testResult = engine.Evaluate("t.test(group1, group2)").AsList();
```
the line before is all good.
help me please

Viewing all articles
Browse latest Browse all 1634

Trending Articles