No good to have the R vectors able to be loaded (and load into) both int? and int ??
double.NaN is ok (does this imply a +/- infinity ?) but I can see on the integer side no good way to represent (the R) NA could be an issue.
How about the R.NET datatypes, NumericVector, etc, holds a "doubleR" and "intR" array - which CAN be loaded straight into a double, double?, int, or int? --- but also one can examine each element and see the real R value.
So, after a load with....
NumericVector b = engine.Evaluate("c(1.2,2.3, NA, 4.5)").AsNumeric();
You could -
double d = b.ToArray(); [ NAs become 0 or -9999 or double.NaN]
double? d = b.ToArray(); [NAs become null ]
int i = b.ToArray(); [NAs become 0 or -9999]
int? i = b.ToArray() [NAs become null]
foreach(var x in b)
Any thoughts or barking up the wrong tree ?