Diagnosing boolean types
Specific methods for booltype
are required, where non-unary methods can combine multiple bollean types, particularly boolean binary operators.
booltype(x)
x |
an R object |
non-boolean types
logical
for representing any boolean data including NA
bit
for representing dense boolean data
bitwhich
for representing sparse (skewed) boolean data
which
for representing sparse boolean data with few TRUE
ri
range-indexing, for representing sparse boolean data with a single range of TRUE
one scalar element of booltypes
in case of 'nobool' it carries a name attribute with the data type.
do not rely on the internal integer codes of these levels, we might add-in hi
later
unname(booltypes) str(booltypes) sapply(list(double(),integer(),logical(),bit(),bitwhich(),as.which(),ri(1,2,3)), booltype)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.