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

New Post: Creating DataFrame In Memory

$
0
0
If you are using R.NET 1.5.5 I think you can do the following (caveat: I did not run a test)
REngine e;
int[] yourIntegers;
double[] yourDoubles;
// etc.
e.SetSymbol("a", e.CreateIntegerVector(yourIntegers))
e.SetSymbol("b", e.CreateNumericVector(yourDoubles))

var df = e.Evaluate("data.frame(nameForA=a, nameForB=b)").AsDataFrame();
I am currently looking at adding a extension function to facilitate creating data frames, which will make it to what may be called version 1.6 in a few weeks.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



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