NA
is already logical so NA_logical_
is not needed. Just use NA
in those situations where you need a missing logical. Note:
> typeof(NA)
[1] "logical"
Since the NA_*_
names are all reserved words there was likely a desire to minimize the number of them.
Example:
library(data.table)
X <- data.table( a=NA_character_, b=rep(NA,5) )
X[ 3, b:=FALSE ]
> X
a b
1: NA NA
2: NA NA
3: NA FALSE
4: NA NA
5: NA NA