I've got some simple code to do linear reqression on 2 vectors (below). What I'm not sure is how to I get the results back into C#? What would the result types be? I'm particularly interested in model and coef.
Thanks
Thanks
var aVec = engine.CreateIntegerVector(new []{ 1, 2, 5 });
var bVec = engine.CreateIntegerVector(new []{ 12, 15, 20 });
engine.SetSymbol("a", aVec);
engine.SetSymbol("b", bVec);
engine.Evaluate("model = lm(a~b)"); // print out in the console
engine.Evaluate("summary(model)"); // print out in the console
engine.Evaluate("formula = formula(model)"); // print out in the console
engine.Evaluate("formula"); // print out in the console
engine.Evaluate("coef<-coefficients(model)"); // print out in the console