to represent missing values and
to represent not a number. Using the F# type provider for R, I can create a numeric vector that contains both of these using:
I would like to create a vector containing NA and NaN using the
operations, but I'm not sure how to do that. I can create NA for string vector and NaN for numeric vector:
engine.CreateCharacterVector [null; "hi"] // Creates vector c(NA, 'hi')
engine.CreateNumericVector [Double.NaN; 3.14] // Creates vector c(NaN, 3.14)
... but I cannot find a way to create numeric vector containing NA or integer vector containing either NaN or NA. I thought about using
to create an empty vector, but that initializes the values to zeros...
If this is not possible in the current version of R.NET, where should I look if I wanted to add this?
Also, when I convert the vector created using
c(1, NA, NaN)
to .NET using
, I get
[1.0; nan; nan]
and when I use
, I get
[1; -2147483648; -2147483648]
. Does that mean the distinction between NA and NaN gets lost?