as.booltype: Coerce to booltype (generic)

Description Usage Arguments Value Methods (by class) See Also Examples

Description

Coerce to booltype (generic)

Usage

1
2
3
4
## 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)

See Also

CoercionToStandard, booltypes, booltype, is.booltype

Examples

1
2
3
4
5
6
as.booltype(0:1)
as.booltype(0:1, "logical")
as.booltype(0:1, "bit")
as.booltype(0:1, "bitwhich")
as.booltype(0:1, "which", maxindex=2)
as.booltype(0:1, "ri")

Example output

Attaching package:bitThe following object is masked frompackage:base:

    xor

[1] FALSE  TRUE
[1] FALSE  TRUE
bit length=2 occupying only 1 int32
    1     2 
FALSE  TRUE 
bitwhich: 1/2 occupying only 1 int32 in 1 representation
    1     2 
FALSE  TRUE 
[1] 1
attr(,"maxindex")
[1] 2
attr(,"class")
[1] "booltype" "which"   
range index (ri) from 2 to 2 maxindex NA 

bit documentation built on Aug. 4, 2020, 9:06 a.m.