This project is read-only.

Error: could not find function "lm"

Nov 15, 2013 at 2:55 AM
Edited Nov 15, 2013 at 2:56 AM
Hi there!

Having some trouble with the lm function, notably, RdotNet not finding it!
When I try to run I get the titular error, "could not find function".

I have tried --
            var oldPath = System.Environment.GetEnvironmentVariable("PATH");
            var rPath = ALLRG___.RFOLDER();
            var newPath = System.String.Format("{0}{1}{2}", rPath, System.IO.Path.PathSeparator, oldPath);
            System.Environment.SetEnvironmentVariable("PATH", newPath);
            rEngine = REngine.CreateInstance("RDotNet");
            ************************  rEngine.Evaluate("library(stats)");
But no good!

In that case case I get the error:

unable to load shared object 'C:/Program Files/R/R-3.0.1/library/stats/libs/i386/stats.dll':
LoadLibrary failure: The specified module could not be found.
Nov 15, 2013 at 2:58 AM
Not that more simple functions,
            rEngine.Evaluate(" REGN_DFRAME <- ");
            rEngine.Evaluate(" REGN_DFRAME[, 'LABEL'] <- DEP_VECTOR ");
Work fine
Nov 15, 2013 at 3:21 AM
Forgot to include RdotNet.NativeLibrary


Would have deleted but dont know how
Marked as answer by billybond on 11/14/2013 at 7:21 PM