Coerce to booltype (generic)

# Default S3 method
as.booltype(x, booltype = "logical", ...)

as.booltype(x, booltype, ...)

Arguments

x

object to coerce

booltype

target booltype() given as integer or as character

...

further arguments

Value

x coerced to booltype

Methods (by class)

  • as.booltype(default): default method for as.booltype

Examples

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