I want to be able to pass a sequence of option float
to the RProvider in F#
. If I have a sequence of floats with Some float
and Non
You can do it with Deedle and nullable values:
let toNullable =
function
| None -> Nullable()
| Some x -> Nullable(x)
let optData4 =
seq [Some 10.0; Some 9.0; Some 8.0; None; Some 6.0;
Some 5.0; Some 5.0; None; Some 4.0; Some 2.0;
None]
|> Seq.map(toNullable)
let series = Series.ofNullables(optData4)
let testData4 =
namedParams [
"regPrice", series;]
|> R.data_frame