na
object na
na
provides syntactic sugar for constructing primitives recognized as
NA. A use case is be:
Vec[Int](1,2,na,4)
na
will implicitly convert to a primitive having the designated missing
value bit pattern. That pattern is as follows:
- byte => Byte.MinValue
- char => Char.MinValue
- short => Short.Minvalue
- int => Int.MinValue
- long => Long.MinValue
- float => Float.NaN
- double => Double.NaN
The NA bit pattern for integral types is MinValue
because it induces a
symmetry on the remaining bound of values; e.g. the remaining Byte
bound
is (-127, +127).
Note since Boolean
s can only take on two values, it has no na
primitive bit pattern.