R.NET invoke function does not work

Nov 7, 2014 at 2:53 PM
Edited Nov 7, 2014 at 2:55 PM
I have all the necessary requirements when using the R.NET

My code works just fine on R Studio, however no luck on GUI. Can anybody let me know what I am doing wrong please?
REngine.SetEnvironmentVariables(@"C:\Program Files\R\R-3.1.1\bin\i386", @"C:\Program Files\R\R-3.1.1");

engine = REngine.GetInstance();

engine.Evaluate(@"source('C:/Users/achugh/Documents/Graphs/characterization.r')");
            engine.Evaluate(@"source('C:/Users/achugh/Documents/Graphs/sliderDataToComputer.r')");

        var sliderfunc = engine.Evaluate("sliderdata_yprofile").AsFunction();
        var directory = engine.CreateCharacterVector(new[] { "C:/Users/achugh/Documents/Graphs/data" });
        var oldset = sliderfunc.Invoke(new SymbolicExpression[] { directory }).AsDataFrame();
however, 'oldset' always is NULL!!

I already tried testing my script via R-Studio and works just fine.

Any help would be appreciated please

R.NET.Community : 1.5.16
R - 3.1.1
Windows 7 (64-bit)
Nov 8, 2014 at 12:39 AM
This example requires R code you have not included and data, of some type, that you have not included. That's not to say that including all of that would help to reproduce it.

Can you post a minimal reproducible example?
Developer
Nov 15, 2014 at 9:42 PM
For reader's information and cross-reference, this issue was investigated in (this post)[http://stackoverflow.com/a/26950937/2752565] and is not reproducible, at least not with 1.5.16 or above.