This project is read-only.

error in application

Nov 19, 2013 at 3:26 AM
Hi All,

I have installed the in my windows. I have imported the dlls in my application.
I have written a code to generate the normal numbers with a mean and standard deviation using rnorm() function in R. The code executed successfully for the first time. But 2nd time it has thrown error as "Error in the Application". Could anybody please help in this.

SetupPath(); // current process, soon to be deprecated
        using (REngine engine = REngine.CreateInstance("RDotNet"))

            engine.Initialize(); // required since v1.5
             IntegerVector intvec = new IntegerVector(engine,new[] {20});
            engine.SetSymbol("n1", intvec);
            double[] db = engine.Evaluate("x1<-rnorm(n1,3,3)").AsNumeric().ToArray();
Rajesh kandepu
Nov 19, 2013 at 8:17 PM

different issue but look at the code he's using to initialize the engine. you must use a singleton pattern.