Coerce to booltype (generic)
# Default S3 method
as.booltype(x, booltype = "logical", ...)
as.booltype(x, booltype, ...)object to coerce
target booltype() given as integer or as character
further arguments
x coerced to booltype
as.booltype(default): default method for as.booltype
as.booltype(0:1)
#> [1] FALSE TRUE
as.booltype(0:1, "logical")
#> [1] FALSE TRUE
as.booltype(0:1, "bit")
#> bit length=2 occupying only 1 int32
#> 1 2
#> FALSE TRUE
as.booltype(0:1, "bitwhich")
#> bitwhich: 1/ 2 occupying only 1 int32 in 1 representation
#> 1 2
#> FALSE TRUE
as.booltype(0:1, "which", maxindex=2)
#> [1] 1
#> attr(,"maxindex")
#> [1] 2
#> attr(,"class")
#> [1] "booltype" "which"
as.booltype(0:1, "ri")
#> range index (ri) from 2 to 2 maxindex NA