fillUpToByte: Fill up to Byte (00000000..)

View source: R/binary.R

fillUpToByteR Documentation

Fill up to Byte (00000000..)

Description

Fills up the binary number with zeros(0) or ones(1), to the size in Byte.

Usage

fillUpToByte(x, size=0, value=FALSE)

Arguments

x

The binary number to fill up with zeros. (Any binary vector).

size

in Byte. 0 = auto (smallest possible Byte).

value

to fill up with FALSE(0) or fill up with TRUE(1).

Details

No floating point supported.

Value

binary number. A binary vector with the desired size.

See Also

fillUpToBit.

Examples

rdiversity:::fillUpToByte(as.binary(c(1,1), logic=TRUE), size=2)
rdiversity:::fillUpToByte(as.binary(c(1,0,1), logic=TRUE), size=2, value=FALSE)

rdiversity documentation built on May 6, 2022, 9:06 a.m.