I'm trying to convert some R code script into C# code via RDotNet Library. I was able to convert a big part but there's an issue while creating data.table in C#. Above is my code example:
Dictionary<string, List<string>> myDic = new Dictionary<string, List<string>>();
// populate the dictionary
var colNames = new List<string>() { "col1", "col2"};
IEnumerable[] columns = new IEnumerable[2];
columns[0] = myDic.Keys;
columns[1] = myDic.Values;
var mydata = engine.CreateDataFrame(columns.ToArray(), colNames.ToArray(), stringsAsFactors: false);
when i use the variable mydata, I got an exception
Cannot convert type System.Collections.Generic.List`1[System.String][] to an R vector