Learn R Programming

oce (version 0.2-1)

byteToBinary: Format bytes as binary

Description

Format bytes as binary

Usage

byteToBinary(x, endian=c("little", "big"))

Arguments

x
an integer to be interpreted as a byte.
endian
character string indicating the endian-ness ("big" or "little"). The PC/intel convention is to use "little", and so most data files are in that format.

Value

  • A character string representing the bit strings for the elements of x.

Examples

Run this code
library(oce)
x <- 0:16
print(byteToBinary(x))

Run the code above in your browser using DataLab