Learn R Programming

oce (version 0.1-82)

byte2binary: Format bytes as binary

Description

Format bytes as binary

Usage

byte2binary(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(byte2binary(x))

Run the code above in your browser using DataLab