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

New Post: Does R.NET support Skew Normal Distribution (snorm or others)?

$
0
0
Your code works! Now I learned how to link the library and call functions in R. I also learned how to pass the results back to .NET.

To make this works in my .NET application, I need to pass the data (double array, or double list) to sn lib as input (not load from a file):
void foo(List<double> myData)
{
var Y = myData;
e.Evaluate("fit <- msn.mle(y=Y,  opt.method='BFGS')");
var beta = engine.Evaluate("fit$dp$beta").AsNumericMatrix();
......
}
When my data is passed from Y in .NET to y in sn, it causes an following error:
"Error in is.data.frame(frame) : object 'Y' not found
A first chance exception of type 'RDotNet.ParseException' occurred in RDotNet.dll" 
Could you please advise me on how to pass the observed data to sn lib?

Thanks

Viewing all articles
Browse latest Browse all 1634

Trending Articles



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