Displaying 1 result from an estimated 1 matches for "rf_isna".
Did you mean:
r_isna
2007 Dec 03
1
Putting a NULL in a list (as cannot pass NA to C++)
...,4), 5 )
> x
[[1]]
[1] 1
[[2]]
[[2]][[1]]
[1] 3
[[2]][[2]]
NULL
[[2]][[3]]
[1] 4
[[3]]
[1] 5
This is a good thing for me as it can be passed through into C++ where I
can know the value is missing. (Can't seem to detect a NA from C++ for
some reason. There is RF_isNull in the API but no RF_isNA that I can
find!)
Is it possible to put a null in an already created list. e.g. now do
> x[[2]][[2]] <- NULL
> x
[[1]]
[1] 1
[[2]]
[[2]][[1]]
[1] 3
[[2]][[2]]
[1] 4
[[3]]
[1] 5
But x[[2]][[2]] has been deleted.
Many thanks
Regards,
David