binary: Represent An Integer As A Binary Vector

binaryR Documentation

Represent An Integer As A Binary Vector

Description

Represent An Integer As A Binary Vector

Usage

binary(x, digits = NULL)

Arguments

x

[integer()] >= 0

digits

[integer()] length of the output vector

Value

[integer()] [vector()] binary representation of x

Examples

binary(10, digits = 8)

for (i in 0:32) print(binary(i, digits = 6))


luke-a-rogers/pbsedm documentation built on June 3, 2024, 5:20 a.m.