bits2int: Convert a bits object to an integer and vice versa

View source: R/bits.R

bits2intR Documentation

Convert a bits object to an integer and vice versa

Description

Convert a bits object to an integer and vice versa

Usage

bits2int(x)

int2bits(i, n_bit = 16)

Arguments

x

the bits object

i

the integer

n_bit

the number of bits

Author(s)

Thierry Onkelinx

See Also

Other bits: as.character.bits(), bits(), c.bits(), print.bits()

Examples

z <- bits(c(FALSE, TRUE, TRUE, FALSE))
z
y <- bits2int(z)
y
int2bits(y)
int2bits(y, 4)

qrcode documentation built on Nov. 11, 2023, 5:07 p.m.