Could Not Find Function "sd" Error in C#

Feb 18, 2016 at 4:24 AM
Edited Feb 18, 2016 at 4:27 AM
I Develop a Simple program using RDotNet in C#.

I got "sd" function not found error. Can you give me some tips for solve this problem?

function "sd" is in "stats" package that is default library.

I already reinstall R(R-3.1.0-win.exe) again and again.

attached Error message and code as below.

"Error: could not find function "sd"
at RDotNet.REngine.Parse(String statement, StringBuilder incompleteStatement)
at RDotNet.REngine.<Defer>d__0.MoveNext()
at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable`1 source)
at RDotNet.REngine.Evaluate(String statement)"

The code as follow:
NumericVector group1 = regine.CreateNumericVector(examples);

NumericVector STDResult = regine.Evaluate("sd(group1)").AsNumeric();

double[] arrSTD = STDResult.ToArray();
STD = arrSTD[0];
Thanks a lot.
Feb 19, 2016 at 11:57 PM
you need to let the engine know you are intending to use the stats library.

add :
prior to STDResult.