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

New Post: engine.Evaluate in an event driven method

$
0
0
I am not sure exactly what problem you describe. I assume you mean that running your first code sample twice leads to an exception being thrown.

If the assumption is correct I cannot seem to reproduce the issue with R.NET 1..5.5 nor the most recent source code.
You can have a look at the code git repo that I use to investigate R.NET issues and questions.
         engine.Evaluate("a <- 1");
         engine.Evaluate("a <- a+1");
         NumericVector v1 = engine.GetSymbol("a").AsNumeric();
         bool eq = 2.0 == v1[0];
         engine.Evaluate("a <- a+1");
         NumericVector v2 = engine.GetSymbol("a").AsNumeric();
         eq = 3.0 == v2[0];
For a more efficient investigation of this issue uou should provide:
  • The stack trace of the exception
  • The context of your application: which versions of the runtimes, R.NET, R, etc.
  • The context of the function call: event driven how; is there cross-thread calls.

Viewing all articles
Browse latest Browse all 1634

Trending Articles