Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Created Unassigned: GetFactors() bug [104]

$
0
0
In Factor.cs, the GetFactors() method has a bug.
This call will fail: engine.Evaluate("factor(c(\"a\", \"b\", NA, \"a\"))").AsFactor()

To fix it, the method implementation should change to:
public string[] GetFactors()
{
var levels = GetLevels();
return this.Where(value => value != int.MinValue).Select(value => levels[value - 1]).ToArray();
}

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>