powered by
Convert a bits object to an integer and vice versa
bits2int(x)int2bits(i, n_bit = 16)
int2bits(i, n_bit = 16)
the bits object
the integer
the number of bits
Thierry Onkelinx
Other bits: as.character.bits(), bits(), c.bits(), print.bits()
as.character.bits()
bits()
c.bits()
print.bits()
z <- bits(c(FALSE, TRUE, TRUE, FALSE)) z y <- bits2int(z) y int2bits(y) int2bits(y, 4)
Run the code above in your browser using DataLab