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

New Post: How to Query STRING VALUES from Dataframe

$
0
0
This is because the columns of the data frames are vectors that are factors. Even in pure R coercion of factors can be a stumbling block.

I suggest you access the data frame by columns, like the following which gives the expected answer.
         engine.Evaluate("data(mpg, package='ggplot2')");
         var mpg = engine.Evaluate("mpg").AsDataFrame();
         var manufacturer = mpg[0].AsFactor().GetFactors();
         Assert.AreEqual("audi", manufacturer[0]);  // Vorsprung durch technik
I'll open a feature request to see whether R.NET can match the behavior of R.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



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