Learn R Programming

qrcode (version 0.3.0)

bits: Create a bits object

Description

Converts a logical vector into a bits object. This remains a logical vector. The main difference is that is printed as a 0 and 1 bit string rather than a FALSE and TRUE vector

Usage

bits(x)

Arguments

x

a logical vector

Author

Thierry Onkelinx

See Also

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

Examples

Run this code
z <- bits(c(FALSE, TRUE))
z
str(z)

Run the code above in your browser using DataLab