All,

I was wondering if someone could point me to the location of the code in R
that supports NULL values in vectors. I'm curious as to how you implemented
them.

The only possible solution to me seems that for a double [], you need to
keep a parallel bool [] that tells you whether the value is null or not. The
bool [] doesn't have to be a literal bool [] -- you can keep a bit array.
Things like summing up a vector become complicated -- you need to check if
something is null before you perform an operation on it.

For the purposes of vectors of numeric data types, why not represent NULL as
NaN (as long as you're happy with the standard semantics of NaN)

Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to