R: Format bytes as binary

byteToBinary {oce} | R Documentation

## 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`.

### Author(s)

Dan Kelley

### Examples

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

[Package oce version 0.9-20 Index]