R: Cannot convert type System.Collections.Generic.List`1[System.DateTime] to an R vector

446 Views Asked by At

I am building a R data frame using RdotNet. The dataframe has four columns of the types; string ,datetime,double,double. Here is the below code:

List<double> HiSumOilList = new List<double>();
List<double> HiSumWaterList = new List<double>();
List<string> HI_CompNames = new List<string>();
List<DateTime> HI_DateRanges = new List<DateTime>();

IEnumerable[] HI_columns = new IEnumerable[4];
                HI_columns[0] = HI_CompNames;
                HI_columns[1] = HI_DateRanges;
                HI_columns[2] = HiSumOilList;
                HI_columns[3] = HiSumWaterList;
                var HI_column_Names = new[] { "well", "date", "x.oil", "y.water"};
                var HI_DF = engine.CreateDataFrame(HI_columns, columnNames: HI_column_Names);

When I debug the dataframe values, it gives me the error as below. any ideas on why?

An unhandled exception of type 'System.NotSupportedException' occurred in RDotNet.dll Additional information: Cannot convert type System.Collections.Generic.List`1[System.DateTime] to an R vector

0

There are 0 best solutions below