number2binary: Convert number to bit vector

View source: R/typeconv.R

number2binaryR Documentation

Convert number to bit vector

Description

Convert number to bit vector

Usage

number2binary(number, noBits)

Arguments

number

a number to convert to a binary vector

noBits

the final length of the binary vector. If missing, return the full (native) bit vector

Value

a vector of 0's and 1's

Examples

number2binary(1)
number2binary(2)
number2binary(3)
number2binary(4)

stackcon/rngt documentation built on June 17, 2022, 5:29 p.m.